I'm a Linux newbie but I need to upgrade PHP on CentOS 4.5 to the latest version -- or at least 5.2.2 or better. What's the easiest way to do that? The latest available via yum seems to be 5.1.6 and I can't find anything on the Web that seems to work.

  • I have the same question, but for a centos 5 production box. We used to use utterramblings's packages, but the maintainer's been MIA for over a year, so I'm hesitant to use another 3rd party repository, and I'm naturally hesitant to use the testing repo on a production box. In an ideal world, I'd like to see redhat's "AppStack" packages ported to centos: redhat.com/appstack – Frank Farmer Jun 4 '09 at 1:16

Check out Remi Collet Repository. Repo configs for RHEL/CentOS 4 are available (i386 and x86_64 )


There is a repository on yum called c5 testing i think. It has PHP 5.2.6 A note though, not all modules in PHP are in this testing repo, and some you have to update yourself.

So this is not something I would recommend on a live server. I did this on a dev server and had some problems.

yum --enablerepo=c5-testing install php

I think this works, i have the commands at work but you can google some info regarding the c5 testing repo and PHP.


If al else fails, you can always compile from source. I've done it before on CentOS and it actually works quite smoothly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.