Super User is a question and answer site for computer enthusiasts and power users. 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 currently using centOS 5.2 I want to install php 5.3.3. how do I install using yum?

share|improve this question

migrated from stackoverflow.com Mar 26 '11 at 14:08

This question came from our site for professional and enthusiast programmers.

You have to first add a repository that has PHP 5.3. In this case you can use the webtatic one

rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

Then execute the following:

yum update

Install PHP:

yum --enablerepo=webtatic install php
share|improve this answer

To install a specific version, just ask to yum to install the package with its full name.

For example, if the fullname of php-5.3.3 is 'php-5.3.3-1.el5.remi.x86_64.rpm' :

yum install php-5.3.3-1.el5.remi.x86_64.rpm

For more information, you can read this small article : http://www.zulius.com/how-to/yum-install-specific-package-version

share|improve this answer
    
@SeyZ Thanks a lot. I tried it did not work on the box. – Subodh Chettri Mar 26 '11 at 12:28
    
I'm not on a yum package manager so I can't test for you. Are you sure that the name of the package is correct and is the full name ? – SeyZ Mar 26 '11 at 12:30

What happens when you run yum list php or yum search php? Do you have a repository that has php 5.3.3? CentOS 5.2 is rather old so by default it comes with an older version of PHP. I'm running 5.4 and had to find a repo that has the latest version.

I use this repository.

share|improve this answer
yum install php-5.3.3

is enough

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .