Compiling Apache, PHP and MySQL from source.
Hello everyone,
I'm using CentOS4 x86_64, and I want to compile/install Apache, Php and MySQL from the source code. I have downloaded and untarred all three softwares, but I'm not understanding what options should I include. This is the first time I compile form source, and I'm doing it because I want to have some experience, and because YUM does not offer the latest releases of these softwares. I have downloaded the source code to ~/sourcecode/ folder. I have a basic experience, as I tried to compile apache once. My question is: What kind of options do you recommend? and what should be compiled before the other? so far, I have gathered these information: Apache first, then MySql, then php. I know the --prefix option, and something about apsx, which I have no idea what that is. For PHP, I think there is --with-mysql or something... And what about security? I always read that each process (apache, php, mysql) should be run on different useraccount with tight privileges. Any of you have experience in that? and how do I exactly do it? Thanks a lot for your time. |
Okay, after reading a little, I did the following:
For apache: ./configure --prefix=/wwwroot --enable-so --enable-cgi --enable-info --enable-rewrite --enable-speling --enable-usertrack --enable-mime-magic For Php: ./configure --prefix=/wwwroot/php --with-apxs2=/wwwroot/bin/apxs --with-config-file-path=/wwwroot/php --with-zlib --disbale-cgi --with-gettext I couldn't compile MySQL. I'm trying to figure out how .... Is there a way to enable MySQL later on when I compile it? As you noticed, I didn't use --with-mysql when compiling PHP. |
Quote:
Quote:
|
you can install mysql whenever you want or need. You can take a binary version too. They are compiled with intel compiler and tend to run faster than those built with gcc. The --with-mysql would have been useful if you intend to connect to mysql from php...
|
I have compiled them all :). MySQL required gcc-c++ which I didn't have. Now I'm facing another problem. I cannot find my.conf so I could use MySQL ;p. I'm having this error:
Quote:
|
You can search the support-files/ subdirectory where you've compiled mysql for various my-whatever.cnf. Pick the one that matches your needs and copy it in /etc, or under the subdir etc/ in the directory you've installed mysql.
Quote:
You can also search LQ for this error to find more answers. Regards |
Thanks a lot bathory. I'm still battling my way through. I've tried to search the subdirectories after installation, but I couldn't find anything. I will read the mysql docs later on. Thanks though.
|
All times are GMT -5. The time now is 03:05 PM. |