Home  >  Article  >  Operation and Maintenance  >  How to install php5.5 using yum method

How to install php5.5 using yum method

王林
王林Original
2020-10-29 17:47:343106browse

How to install php5.5 using yum: 1. Check the php package installed in the current system; 2. Uninstall the installed php package; 3. Run yum install; 4. Execute [yum install php55w-fpm ] command to install php fpm.

How to install php5.5 using yum method

Environment:

centos system

The specific method is as follows:

(Video tutorial recommendation: php video tutorial)

Check the currently installed PHP packages

yum list installed | grep php

If there are PHP packages installed, delete them first

 yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64

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

If you want to delete the package installed above, reinstall it

rpm -qa | grep webstatic
rpm -e  上面搜索到的包即可

Run yum install

yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64
yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64

Note: If you want to upgrade to 5.6, just replace the above 55w with 56w.

yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64

Install PHP FPM

yum install php55w-fpm 
yum install php56w-fpm 
yum install php70w-fpm

Note: If you want to upgrade to 5.6, just replace the above 55w with 56w.

Related recommendations: php training

The above is the detailed content of How to install php5.5 using yum method. 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