29 Jan 2010

CentOS5 and PHP52 upgrade rpms 

By - Apache, Linux 1 Comment

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.
Not only is PHP available, but also the latest MySQL and many others.  Check out the documentation for further details.
* 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.

One Response to “CentOS5 and PHP52 upgrade rpms”

  1. Robert Citek says:

    Here’s a script way to carry out steps 2 and 3:

    $ rpm -qa –queryformat “%{NAME}\n” | grep ^php > /tmp/php.rpm.list
    $ cat /tmp/php.rpm.list | xargs rpm -e
    $ cat /tmp/php.rpm.list | xargs yum -y install

    That give you an option to revert, just in case.

Leave a Reply