As you probably know, the latest CentOS and RHEL distros are available only with PHP 5.1.6 and if you want to upgrade PHP, you need to install it manually (or to find someone to do it for you 🙂 ). The 5.2.5 release brings several security enhancements, more than 60 bug fixes, and improved performance for those of you that like arrays (and really, who doesn’t?). I wanted to install latest RoundCube webmail application and it won’t work if you don’t have PHP> 5.2. Also, latest Vivvo won’t work without 5.2.x
So, if you don’t want to build rpms or to go through ./configure, make, make install nightmare, you can enable Jason Litka yum repository to your RHEL or CentOS system. To do this please follow next few steps.
First you need to validate that the packages came from Jason Litka and you’ll do it with next command:
#rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka |
After you added his public GPG key, you’ll need to adjust yum so he can search at his repo. To do this, please follow next steps:
#nano -w /etc/yum.repos.d/utterramblings.repo |
Now copy next lines inside this file and save those changes.
[utterramblings] name=Jason's Utter Ramblings Repo baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka |
Now you can upgrade your PHP installation with simple:
#yum update php |
More information about this can be found HERE.
#php -v |
should return
[root@ns1 ~]# php -v PHP 5.2.6 (cli) (built: May 5 2008 10:32:59) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies [root@ns1 ~]# |
I forget to say that you should restart httpd after upgrade.
super i love this …. its work for me …:)