We encounter many scenarios where using the latest version of PHP is required. No great way, aside from downloading the PHP5 source and compiling, is available. That is, until you discover then IUS Community Project.
What is the IUS Community Project?
The IUS Community Project is an effort to package rpms of the latest stable versions of the most commonly requested software on Red Hat Enterprise Linux and CentOS. IUS provides a better way to upgrade PHP/MySQL/Python/Etc on RHEL or CentOS. The project is run by professional Linux Engineers that are primarily focused on RPM Development in the web hosting industry.
What IUS is NOT?
For one, IUS is not a service of Rackspace but rather is Sponsored by Rackspace. Additionally, IUS is not the same as Fedora EPEL or similar repos. EPEL is geared towardsadding packages to RHEL, and has strict guidelines that none of their packages replace anything in RHEL. IUS on the other hand is explicitly geared towards providing packages thatdo replace existing software in RHEL. Essentially, we are offering a proper way to upgrade software on RHEL when you really need it the latest upstream versions of software.
So, to install PHP52 on CentOS5 /RHEL5 (or CentOS4 / RHEL4).
- First install the yum repositories as described at http://wiki.iuscommunity.org/Doc/ClientUsageGuide
- Remove all existing php rpms, using ‘rpm -e php php-mysql’ .. etc for each rpm.
- Install php52 rpms, using ‘yum install php52 php52-cli php52-mysql’ .. etc.