How to use yum to install a specified version of php

王林
Release: 2023-03-05 10:46:02
Original
4452 people have browsed it

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
Copy after login

and then delete the old version of php

yum remove php
Copy after login

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

yum list php*
Copy after login

(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
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template