Update PHP 5.1 to PHP 5.3 in CentOS
Updating PHP in CentOS to latest PHP 5.3 or PHP 5.4 is not an easy task so I am writing this post. I had to do this for a project in which I need to install latest Zend Loader with PHP 5.3 support.
So let’s get some action:
wget http://dl.fedoraproject.org/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
With the above command we have downloaded and installed the EPEL and
REMI repositories, you might ask your self what does EPEL and REMI stand
for? Let me clarify you that:
EPEL
Extra Packages for Enterprise Linux (EPEL) is a
volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages for Red Hat Enterprise (RHEL) and its compatible spin-offs such as CentOS or Scientific Linux. Fedora is the upstream of RHEL and add-on packages for EPEL are sourced from the Fedora repository primarily and built against RHEL.REMI
This is a repository created by Remi Collet with the aim to give support for old Fedora releases to allow them to install recent software, also it gives you the ability to have your CentOS/RHEL systems with the latest software available in the net.
Now it’s time to update our PHP to the latest one (Which is PHP 5.3.0 (cli) (built: Jul 19 2009 18:22:52) in this moment)
yum --enablerepo=remi update php php-*
/etc/init.d/httpd restart
And that’s it!
You can check your installed PHP version executing:
php -v
Hope it help. Do let me know.
post has been excellent and i have referred it to many of my friends.