permalink

off

Compile PHP 5.3.19 on CentOS 6.3 with Curl 7.28

new-php-logo

For this installation I choose CentOS 6.3 minimal version. You can download the ISO from the mirrors or direct download it from SYNc yourself. Once the CentOS installation is completed make sure you are connected to Internet to update the latest libraries.

 

Note: These steps are done assuming you are logged in as root user

1. Please update the available updates for the OS and restart

2. Install EPEL (Extra Packages for Enterprise Linux) so that you can get all the needed libraries for compiling PHP

3. Install Development Tools – Detailed User Guide

4. Install MySQL Database client

5. Install the following libraries which are required for different modules in PHP. Please make sure all the dependencies are met before installation

6. For this installation I planned to use the latest version of curl so I had to my custom curl compilation

7. Download and compile PHP 5.3.19

8. Copy php.ini

9. Edit Apache conf check if “LoadModule” is present else add it.

LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so

10. Set handler for Apache to handle PHP files

11. If you are not planning to install ZendGuardLoader skip to step 13 else make sure you have disabled SElinux. Detailed instructions

12. Install ZendGuardLoader

Edit /usr/local/php-5.3.19/lib/php.ini and add these lines to end

13. Restart you apache and you are set

It took a great deal of time to make this work and with lot of trial and errors. If anyone finds a better way to compile please do share it with me. All the best ;-)

Comments are closed.