Recently I need to install PHP 5.3 on CentOS. You can install PHP 5.3 by compiling source code, but for me yum is better. To install PHP 5.3 from yum you need to add Remi’s repository.

On CentOS 6, run

wget http://download.fedora.redhat.com/pub/epel/beta/6/i386/epel-release-6-5.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

On CentOS 5.X, run

wget http://download.fedora.redhat.com/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

By default Remi’s repository is not enable. Open /etc/yum.repos.d/remi.repo and change enable=0 to enable=1

Then install PHP 5.3 by running,

yum install php php-*

Restart HTTP server to get changes reflected.

service httpd restart
PHP 5.3 on CentOS
Tagged on:                                         

Leave a Reply

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

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recommend on Google