I heard that latest version packages related to LAMP for CentOS can be found in remi repository.
I googled and found more than one article (e.g. http://timt881.wordpress.com/2009/02/17/installing-phpmyadmin-and-php-52-on-a-centos-52-server/) suggesting the following steps in installing latest version of PHP from remi repository:
$ wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
$ wget http://rpms.famillecollet.com/el5.i386/remi-release-5-7.el5.remi.noarch.rpm
$ rpm -Uvh remi-release-5-7.el5.remi.noarch.rpm epel-release-5.3.noarch.rpm
$ yum –enablerepo=remi install php
However, there is something I don't understand. The LAMP packages are in remi repository, it makes sense to download and install the remi rpm.
But for the EPEL (Extra Packages for Enterprise Linux) rpm, why should it also be downloaded and installed if what's needed is already in the remi repository?
It sounds like the remi repository's rpm's may include dependencies on packages in EPEL.
EPEL provides additional packages above and beyond the default set shipped in RHEL/CentOS but has a policy of not replacing shipped packages with newer versions. This is a focus on stability, with the idea that you shouldn't be using one of the RHEL-types of platforms if you really need that cutting edge package version.
The remi repository provides replacement rpms of the latest versions of many popular packages (Firefox, Thunderbird, php, etc). These rpms are in direct conflict with the shipped versions and you will receive zero support or security updates from Red Hat (in the case of RHEL) or the CentOS team for those packages. You're reliant on remi for making updates and patches for you.
If you absolutely need the latest version of php, you may want to look at a distro that ships more current packages (e.g. Fedora, Ubuntu). If you really value the stability/long term support of RHEL, then see if you can make do with the shipped versions. If you require the latest versions on CentOS, then the remi repository may indeed be a good resource.
enter code here
# Supported Red Hat Enterprise Linux 5 / i386:enter code here
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
enter code here
# Red Hat Enterprise Linux 5 / x86_64:enter code here
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm'
enter code here
rest you need to follow steps from following link!!
http://studyhat.blogspot.com/2009/11/rhel-installing-apache2-with-php5-and.html