Centos – how to update php on centOS

centosPHPupdateyum

I have php 5.1.6 installed on a centOS server, and I need at least 5.3.2 (but would rather install the latest available 5.* version).

If I run

yum update php

it says it will update to 5.1.6-34.el5_8 (mine is 5.1.6-27.el5_5.3)….. what the heck????

Are the available packages for centOS THAT much behind the current version, or is it because yum will by default only update within the subversion after the second dot (or something) and I need to tell it to give me a more recent version? If so how do I do that?

Best Answer

You are most likely running old version of Centos (5.5 or even earlier), which doesn't have PHP 5.2.x or 5.3.x in it's repos. You have 2 options: update Centos to a more recent version (5.6 is the first one with PHP 5.3) or use http://iuscommunity.org/About