Home  >  Article  >  Backend Development  >  How to use yum to install a specified version of php

How to use yum to install a specified version of php

王林
王林Original
2020-08-27 15:17:374393browse

How to use yum to install a specified version of php: 1. Check the installed php version; 2. Execute the [yum remove php] command to delete the old version of php; 3. Execute [yum install php version number] Just install the command.

How to use yum to install a specified version of php

Specific method:

(Recommended tutorial: php video tutorial)

First perform the following Command to view the installed php

yum list installed | grep php

and then delete the old version of php

yum remove php

Then check if there is a php version that you need to install

yum list php*

(Related recommendations: PHP training)

If not, you need to add a third-party yum source.

CentOs 5.x 
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm 
CentOs 6.x 
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm 
CentOs 7.X 
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm 
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
//rpmforge
#32位:  
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm  
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm  
#64位:  
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm  
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm

After the addition is completed, you can use the yum repolist command to view the installed sources.

Finally install the specified version of php, for example:

yum install php55w

The above is the detailed content of How to use yum to install a specified version of php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn