Home  >  Article  >  Backend Development  >  Linux system CentOS uses yum method to install the specified version of PHP. Add yum source to upgrade from PHP53 to 54/55/56.

Linux system CentOS uses yum method to install the specified version of PHP. Add yum source to upgrade from PHP53 to 54/55/56.

WBOY
WBOYOriginal
2016-07-29 09:09:201179browse

The default version is too low, and manual installation is troublesome. If you want to use Yum installation, you can use the following solution:
First delete the old version of PHP,
You can view all installed php through yum list installed | grep php Software
Use yum remove php... Delete

Use yum list php* to check if there is a version you need to install. If not, you need to add a third-party yum source. It is recommended to install webtatic, rpmforge, and domestic 163

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 installation is complete, you can use yum repolist to view the installed sources, or you can view it through ls /etc/yum.repos.d/.
Then yum install php55w or yum install php54w or yum install php56w... you can install the new version of PHP

The above introduces the Linux system CentOS using yum method to install the specified version of PHP, adding yum source, upgrading from PHP53 to 54/55/56, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

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