Installing A Custom Repo

To install PHP 5.2.5 which is the latest version in the repos  you can make use of a RPM repository maintained by Remi. He has a repository for many distros. Follow  the steps to get it done ..

wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

Now you have remi’s repo in ur system. so to use the remis repo to install your packages you have to tell yum to use the new repo..

yum --enablerepo=remi update php

You are done..
Hope it helps