How to Install PHP 5.2.X on CentOS 5

Last modified by 5live on Thu, June 24, 2010 15:23
Source|Old Revisions  

This is an old revision of the document!

The Remi repository install only supports the latest PHP version, which is currently 5.3.X. After searching around, I found PHP 5.2.X is still available from the CentOS testing repository.

To begin the install, start by adding the CentOS testing repository to yum

  cd /etc/yum.repos.d

Then import the gpg key for this repository as follows:

  rpm --import

Now you are ready to install PHP 5.2.X from the CentOS repository (c5-testing).

  yum --enablerepo=c5-testing install php

Or, If you are updating from an older PHP version:

  yum --enablerepo=c5-testing update php

The same applies if you need to install Mysql:

  yum --enablerepo=c5-testing install mysql

Or, for an update:

  yum --enablerepo=c5-testing update mysql

That’s it! Hope this helps...