jump to navigation

How To: Install PHP 5.3 on CentOS 5.1 or RHEL 5.1 January 7, 2011

Posted by Tournas Dimitrios in Linux.

PHP 5.2 and PHP 5.3 has tons of functionalities which are not provided by PHP 5.1 (it has more OOP targeted features ) . PHP 5.1 is the most recent version of PHP available in CentOS 5.x and RHEL 5.1 via updates. Also, its difficult for people to upgrade OS(s) on production servers frequently and especially if the servers are running absolutely fine, it doesn’t really make sense to upgrade just for the heck of it. One more reason for no upgrades is the OS choices provided by many hosting companies. But a lot of CMS(s) and softwares are now recommending at least PHP 5.2 for an extended feature set.

I tried a lot of repos for CentOS including RPM Fusion, RPM Forge, EPEL etc., but none of them could provide even PHP 5.2. In some corner of my mind, I had a faint idea of Remi Collet publishing updates about Remi repository. Did a quick google search and found out that PHP 5.3 is actually available in the repository <img src="http://reviewlinux.com/images/smilies/biggrin.gif" border="0" alt="" title="Big Grin" class="inlineimg" />

So, if you are really in need of PHP5.3 on your CentOS/RHEL 5.1 or lesser, head over to Repository Configuration Page and follow the instructions.

For Centos 5.x follow these steps :

  1. cd  /etc/yum.repos.d
  2. wget http://rpms.famillecollet.com/enterprise/remi.repo
  3. yum – -enablerepo=remi update php php-* mysql-*
  4. service httpd restart

Note : The remi  repository is not enabled by default , instead of enabling it via his configuration file , use the ”  –enablerepo=remi  ” switch argument . Restart your web server so that the updated php engine can be enabled .



1. Jeff Jennings - August 3, 2011

I have an red hat el5 server for which the entitlement has run out.

if there any way to upgrade from 5.1 to 5.3 without paying for a new entitlement?

tournasdimitrios1 - August 3, 2011

So far as I know , if you don’t pay the subscriptions for RHN , then there is NO point in you using RHEL .
If you’re not willing to pay for updates , then you should think about *migrating* the system to CentOs .
Migrating to CentOs has been documented >>>>>>>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s