Installing php 5.4 or 5.5 on CentOS 6.x / RHEL 6.x / SL 6.x

There are many posts on the internet about people wanting to install a newer PHP release on their EL6 boxes. Most of these posts will tell you to either install the ‘remi’ repository, or packages from ‘webtatic’. However, there is a newer, and in my opinion better, method now. Software Collections

Redhat has created the concept of software collections, in which they can provide newer or additional packages to the base OS. These packages come with a more limited support package, but they are at least a somewhat standardised way of installing additional functionality without impacting the base OS. Red Hat Enterprise Linux 6

In RHEL systems, collections can be enabled with:

  • Enable the redhat collections channel

    • rhn-channel –add –channel=rhel-x86_64-server-6-rhscl-1

  • Then install software from it:

    • yum install php54-php

More info can be found on http://developerblog.redhat.com/2013/08/01/php-5-4-on-rhel-6-using-rhscl/ CentOS 6 / SL 6 / OEL 6

For the community EL6 systems, the following procedure can be used:

The list of available collections and their package-url’s can be found on https://www.softwarecollections.org/en/scls/