≡ Menu

How to upgrade PHP 5.3 on Centos

php logoTo upgrade to PHP 5.3.x on CentOS/RHEL/Fedora:

Step 1) Set up the atomic channel:

wget -q -O - http://www.atomicorp.com/installers/atomic | sh

Step 2) Upgrade to PHP 5.3.x:

yum clean-all
yum update php

Step 3) Update libxml2:

$ yum update libxml2

Step 4) Replace the PHP 4 php.ini with PHP 5.3.x’s (if applicable):

mv /etc/php.ini.rpmnew /etc/php.ini

Step 5) Replace the php.conf with the PHP 5.3.x php.conf (if applicable):

mv /etc/httpd/conf.d/php.conf.rpmnew /etc/httpd/conf.d/php.conf

Step 6) Restart the webserver

service httpd restart

Step 7) Update crontab
Maybe would it be a good idea to update your packages automatic by installing a crontab:

$ crontab -e

Insert:

0 2 * * * yum -y clean all >/dev/null 2>&1
5 2 * * * yum -y update --disablerepo=atomic >/dev/null 2>&1
10 2 * * 1 yum -y update php >/dev/null 2>&1

Reference: http://www.atomicorp.com/wiki/index.php/PHP

{ 0 comments… add one }

Leave a Comment

CAPTCHA
*