Linux: How to upgrade PHP from 5.1 to 5.2 in CentOS5?

First Check PHP version that is currently installed

$ php -version

Check Linux Version

$ cat /etc/*-release (or redhat-release)

Create a repo file with the content given below. As you can note, we are looking for package upgrade related to php only.

$ vi /etc/yum.repos.d/CentOS-phpupgrade.repo

# CentOS5-Upgrade:
# This repository is a proving grounds for packages on their way to CentOSPlus and CentOS Extras.
# They may or may not replace core CentOS packages, and are not guaranteed to function properly.
# These packages build and install, but are waiting for feedback from testers as to
# functionality and stability. Packages in this repository will come and go during the
# development period, so it should not be left enabled or used on production systems without due
# consideration.
[cent5-upgrade] name=CentOS5 Upgrade
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
includepkgs=php*

Update the repository

$ yum update

Restart Apache server

$ service http restart

Check the PHP version that is installed

$ php -version

Check the package repository

$ rpm -qa | grep php

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Written by kurinchilamp


Website: http://

1 Comment
  • Konsult says:

    I will immediately take hold of your rss as I can’t to find your email subscription hyperlink or newsletter service. Do you have any? Kindly allow me understand so that I could subscribe. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

Kurinchi Calendar
November 2011
M T W T F S S
« Oct   Dec »
 123456
78910111213
14151617181920
21222324252627
282930  
Read previous post:
SEO: Steps to take after submitting to search engines

Part 5: Steps to take after submitting to search engines (from the web) Maintenance check All Web sites should be...

Close