Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My dedicated hosting provider has installed php-5.1.6-27.el5.x86_64 on my server whereas I would like PHP 5.3.3 installed (64 bit)

I can't seem to upgrade it at all

root@server [~]# php -v
PHP 5.1.6 (cli) (built: Mar 31 2010 02:39:17)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

root@server [~]# yum install php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Package php-5.1.6-27.el5.x86_64 already installed and latest version
Nothing to do

I think I have RHEL5, but I'm not sure where to verify this from:

root@server [~]# uname -r
2.6.18-194.17.1.el5

root@server [~]# cat /etc/issue
CentOS release 5.5 (Final)
Kernel \r on an \m
share|improve this question
add comment

3 Answers

up vote 0 down vote accepted

Try this link:

http://www.webtatic.com/blog/2009/06/php-530-on-centos-5/

share|improve this answer
    
I dont have redhat? What's centos? –  matt74tm Oct 18 '10 at 7:23
    
I'm a little hesistant to install stuff from someone's server just like that... –  matt74tm Oct 18 '10 at 7:24
    
I actually discussed with our hosting provider and we finally ended up going for exactly that! Thanks Rosco! –  matt74tm Oct 20 '10 at 5:46
add comment

Welcome to RedHat Enterprise (and clones, since CentOS is a free rebuild from RHEL SRPMs (mostly)).

The bad news is that what you have installed is the current version available to RedHat customers. This is more or less what was current when RedHat released version 5.0 three years ago.

RedHat Enterprise distributions are prized for their extreme stability, in that nothing(1) changes unless it is necessary to change. RedHat will provide security fixes, but other than that very little changes in the distribution. This means you can set up a server and don't have to worry about something changing underneath you during the lifespan of the system.

The worse news is that while you can install something newer, you lose much of the benefit of having the RHEL-based system. You get to worry about security updates, and potentially updates of those components which depend on (or depend on things which conflict with) your manually installed component.

I see there is a link to a 'blog post where someone has their own built copy of a newer version of PHP. This may indeed be what you want, but you'll then depend on this repository to stay up to date and be timely with fixes.

If you are up for either of those scenarios, you are off to the races.

If you want the stability and relatively-easy-to-update-ness of RHEL, I would consider trying very hard to make do with what is available in the stock distribution.

--

(1) Well except Firefox. And glibc. And...

share|improve this answer
    
I describe this as the "old and stable meets new and shiny!" problem. –  David Mackintosh Oct 18 '10 at 7:31
    
Crap - and even if I want to 'take the risk' of installing / upgrading just PHP? There is no way I can do that...?? Surely some way of upgrading that directly from php.net must exist? –  matt74tm Oct 18 '10 at 7:52
    
@matt_tm - Sure, you build from source: php.net/manual/en/install.unix.php (if you're only familiar with installing precompiled binaries, you might want to read a few man pages on the topic before you get started) –  danlefree Oct 18 '10 at 8:35
    
I'm doing just that and its an awful mess! –  matt74tm Oct 18 '10 at 10:55
    
After installing 20-25 missing modules/dependencies, i got it to make but then make install seems to fail - see serverfault.com/questions/192006/… –  matt74tm Oct 18 '10 at 11:06
show 1 more comment

As has been mentioned, RHEL doesn't contain a newer version of PHP compared to what you've got installed so you've got two options:

Compile from source, goto php.net and download the source distribution, install all the build tools on your server (or far better, another box) and ./configure && make && make install. Then hope that you've got all the options you need for compatibility. Certainly not impossible, but you would need to weigh the flexibility against the requirement to build a new version each time you want to apply a security fix.

The other option is to use third party repositories, as you've realised there is an issue of trusting the binary packages that someone else is maintaining. We've recently had the same issue as you, developers here requiring a newer version of PHP than is officially supported by RedHat.

I ended up using the repos @ http://iuscommunity.org. It's a project sponsored by RackSpace (who are at least fairly reputable) who provide RedHat binary compatible packages and security updates, they carry several versions of PHP including 5.3.3.

share|improve this answer
    
Hi James - I'm still trying to figure this out... so what do I need to do next? There are a bunch of files at dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/repoview - how am i supposed to use them? Also, they say at "iuscommunity.org/getting-started/"; that "Note: IUS Packages replace stock RHEL packages, however they do not obsolete them. Meaning, you can’t just ‘yum upgrade’ and get our packages… you need to first remove the stock RHEL package such as mysql, and replace it with the IUS package such as mysql51. " –  matt74tm Oct 18 '10 at 10:44
    
You can just download the individual RPMs, but more useful is to add the repository to your yum configuration - there is a neat packaged way to do this too. Grab the epel-release (dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/repoview/…) and ius-release (dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/repoview/…) RPMs and install them (rpm -iv epel-release ius-release). –  James Yale Oct 18 '10 at 13:58
    
After that when you 'yum search' it will include the iuscommunity.org repositories. You're quite right about the packages replacing the stock RHEL ones, you'll need to remove the standard RHEL php packages first, 'yum remove php*' worked for me when I did it. Finally you can then install the updated versions, 'yum install php53'. –  James Yale Oct 18 '10 at 14:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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