Swimminginthought

A place for all things technical and my mind..

Menu
  • About Me / Hire Me
Menu

Updating PHP to on Centos 5.x

Posted on November 23, 2011 by Percy Kwong

OK.  So you’re running something that requires php above 5.1.x and you need to update your PHP instance.  The problem is, Centos 5.x doesn’t make it easy.

So here’s the quick and simple solution.

create the following file in yum.repos.d:         CentOS-Testing.repo

inside that file, just paste the following:

[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
priority=5

Now, just save the file.

as root, issue the following command:

yum –disablerepo=* –enablerepo=c5-testing update php*

EDIT:  That’s 2 dashes before disablerepo and enablerepo!!!

That should do it!  You’ll now have updated your php and it’s components to php-5.2.x

Hope that helps!

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Kubernetes install gotcha on CentOS-7.x
  • Infrastructure as Code using AWS Cloudformation
  • Does SSL matter? It does and it’s not just web encryption.
  • Apache can’t serve the .well-known directory
  • Cloudy with a chance of Meatballs
  • Resurrection of the Blog
  • Encryption type Matters with Deep Packet Inspection – solved
  • Completely off topic.. Just a personal note.
©2025 Swimminginthought | Built using WordPress and Responsive Blogily theme by Superb