Howto: Install Apache 2.2.x and PHP 5.3.x on CentOS 5

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


3. Download PHP source (refer the latest one from


4. Build the Apache,

tar zxvf httpd-2.2.21.tar.gz
cd httpd-2.2.21
./configure --enable-so --enable-rewrite=shared
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 install
cp php.ini-production /usr/local/lib/php.ini
cd ..

6. Now, start the Apache services,

/usr/local/apache2/bin/apachectl start

How to convert cPanel to CloudLinux

CloudLinux which used to promise to improve server stability, increase server density, decrease support costs and compatibility.

If you are using cPanel and would like to convert to CloudLinux, use the step as below.

1. First of all, you shall use at least CentOS 5 and above.
2. Get the license key from cPanel or CloudLinux.
3. Run the command as below from SSH.

# wget
# sh cpanel2cl -k
# reboot
# /scripts/easyapache --build