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.

Old Server CentOS 5 PHP 5.2.14

New Server RHEL 6 PHP 5.2.14

Thus far, I've been compiling PHP 5.2.14 from source which has worked fine but now I'm realizing installing php-devel from rpm will ask to upgrade PHP. What's the best way to move to this new RHEL6 server but maintaining the PHP 5.2.14 version along with the extensions? I know I can't use the default RPM repo.

share|improve this question
3  
Don't move? Don't stay on an ancient version of PHP? –  Michael Hampton Oct 15 '12 at 21:25
    
You haven't explained why you need to continue using an unsupported version of PHP. You can download the latest 5.3 and first try compiling with the same configure command you use with 5.2 –  user16081 Oct 15 '12 at 21:37
    
Per the dev, upgrading to 5.3 will break "stuff." I'll have to see what was deprecated. –  Michael Oct 15 '12 at 22:52
    
ultimately it will be better to fix the "stuff" than to keep using outdated unsupported software. maybe not today but sooner or later you will have compelling reason. –  user16081 Oct 15 '12 at 23:12
    
I concur and that is my recommendation just doing my homework and having a backup plan. Let's see if other people have recommendations and I will close out. –  Michael Oct 15 '12 at 23:26
add comment

1 Answer

up vote 1 down vote accepted

it's MUCH easier for yourself if you'd stick with RPMs instead of compiling from source as going forward you'll need less of your own time to maintan it. RHEL6 comes w/ PHP 5.3.x yet RHEL5 is 5.2.x., but if you really want to go that route, you'd need to recompile everything again since you're moving up some of major libraries and just by coping files over most likely won't work.

share|improve this answer
    
Pedantry: RHEL5 is 5.1.6, but also offers 5.3.3 as php53. The poster is referring to a custom build. –  jgoldschrafe Oct 15 '12 at 21:46
    
ah, that's new) last time I checked they were only offering 5.2 for RHEL5 and 5.3 for RHEL6, I guess they finally backported it. either case it's much better going with RPMs then compiling from a source –  alexus Oct 15 '12 at 21:48
    
And what if I absolutely need 5.2.14? I know going RPM would be easiest but I might not have a choice. –  Michael Oct 15 '12 at 22:53
    
@Michael In the Debian (apt) world there is "pinning"; YUM has "priorities" which appears to be similar but YMMV. –  Andrew Oct 16 '12 at 4:19
    
@Michael you can try to build your own RPMs using rpmbuild, but honestly PHP 5.4.x is very big improvement over previous release especially 5.2, I'd strongly advise you to go with latest and not legacy. –  alexus Oct 16 '12 at 15:41
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.