I am currently using centOS 5.2 I want to install php 5.3.3. how do I install using yum?

link|improve this question
feedback

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

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

3 Answers

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

link|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
feedback

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.

link|improve this answer
feedback

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
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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