CentOS 5.9 – remove php 5.1 and install 5.2 / 5.3

 

Centos 5.9 coming with php 5.1 and we really need to update

 

remove 5.1 using

 

# yum remove php php*

Installing PHP 5.2  / 5.3

Atomic repository (recommended)
The most convenient means is to use the Atomic repository. CentOS guru recommend that you use it instead of CentOS-Testing due to unstable test software.
Connect the repository:
wget -q -O – http://www.atomicorp.com/installers/atomic.sh | sh
Disable PHP 5.3 that is installed into the repository by default (SKIP THIS STEP IF YOU WANT TO INSTALL 5.3)
exclude = php*5.3*                   –  into [atomic] in the  vi /etc/yum.repos.d/atomic.repo file

Update PHP
yum install php php-mysql php-cgi

 

Once completed successfully, check PHP and its version:
php -v
php -m
Restart Apache
/etc/init.d/httpd restart

 

PHP 5.3 on CentOS/RHEL 5.9 via Yum

PHP 5.3 on CentOS/RHEL 5.9 via Yum

 

To install, first you must install the yum repository information:

rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

Now you can install php by doing:

yum --enablerepo=webtatic install php

Or update an existing installation of php, which will also update all of the other php modules installed:

yum --enablerepo=webtatic update php

 

WP Twitter Auto Publish Powered By : XYZScripts.com