Assume that you do not want to spend money on your server to have a control panel and having minimal requirement for your website,
1. Install the required packages,
yum install bison flex gcc db4 db4-devel libxml2-devel libpng-devel mysql-devel make
2. Download Apache source (refer the latest one from http://httpd.apache.org/)
wget http://apache.petsads.us//httpd/httpd-2.2.21.tar.gz
3. Download PHP source (refer the latest one from http://www.php.net/)
wget http://my.php.net/get/php-5.3.8.tar.gz/from/us.php.net/mirror
4. Build the Apache,
tar zxvf httpd-2.2.21.tar.gz cd httpd-2.2.21 ./configure --enable-so --enable-rewrite=shared make make install cd ..
5. Build the PHP,
tar zxvf php-5.3.8.tar.gz cd ../php-5.3.8 ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --enable-bcmath \ --enable-ftp --enable-magic-quotes --with-pear --enable-sockets --with-zlib --with-gd make make install cp php.ini-production /usr/local/lib/php.ini cd ..
6. Now, start the Apache services,
/usr/local/apache2/bin/apachectl start
This is a great tutorial but I have a error when want to build the apache,after i write ./configure –enable-so –enable-rewrite=shared ,it show the error :
checking for chosen layout… Apache
checking for working mkdir -p… yes
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking target system type… i686-pc-linux-gnu
configure:
configure: Configuring Apache Portable Runtime library…
configure:
checking for APR… no
configure: error: APR not found. Please read the documentation.
please help me ..
Download APR from here,
http://apr.apache.org/download.cgi
And compile it,
./configure
make
make install
Then retry. Hope this help