Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am setting up a staging server using CentOS and need to install PHP 5.3 to mirror my production server. Using the standard yum install php I'm sure will give me 5.4 - I've had a look and can't figure out how to specify a version number to install. Can anyone advise? Many thanks.

share|improve this question
What repositories are you using? – Michael Hampton Nov 7 '12 at 15:20
up vote 0 down vote accepted

To specify a version you do:

yum install php-5.3.3-14 

This assumes that php-5.3.3-14 is available in the repos that your staging server. To see available php versions do:

yum list php

or yum search php and peruse the list it gives you. I am on a CentOS6 box right now and it comes with php-5.3.3-14.

I am assuming you are on Fedora since you mention php 5.4. Would it not be more advisable if you build your staging server with the same OS and repo sources as your production?

I think folks will be able to help you more if you state what OS versions and packages and what repositories are available to your production server. I might be wrong but i think that php rpms must also match the apache they are built for as a module.

share|improve this answer

Your Answer


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.