2011-09-08

PHP 5.3 in Centos 5.x

So, CentOS doesn't come with php 5.3. I know what you're thinking "But there are rpms for it, I can see them listed in yum!" Okay, true, if you do a "yum search php53" you'll get back a list of php 5.3.x packages. But try to find something like memcache or mssql in there? Not there. However, IUS has the rpms you've been waiting for. All you need to do is (for x64 CentOS):
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-8.ius.el5.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-* ius-release-*
Hint: if you get a 404 on these links, open http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ in a browser, find the 'ius-release' and 'epel-release' files and substitute them for these.

You'll then have the IUS repo installed so you can simply "yum install php53u". For me, this consisted of a list of php53u-??? files. If you want it all, yum is nice enough to oblige by running "yum install php53u-*".

It is important to note that these files do not necessarily obsolete CentOS Stock packages. You will most likely have to run "yum erase php" before you install the new php53u packages or risk overlap/inconsistency.

I know this isn't that much of a trick to accomplish, but I just had to do this and I wanted to write it down for myself since I have to do it on a number of hosts... Figured I'd share it here.

No comments:

Post a Comment