Centos 6.9 install php5.6

 

1, check the package currently installed PHP

yum list installed | grep php

If you have PHP package installed, delete them, such as:

yum remove php.x86_64 php-cli.x86_64 php-common.x86_64

 

2, the configuration installed packages

# Centos 5.X
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm

# CentOs 6.x
yum install epel-release -y
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 remove the installation of the above packages, reinstall

rpm -qa | grip webstatic
RPM -e [package to above searched]

 

3, the installation

yum -y install php56w.x86_64
yum -y --enablerepo=webtatic install php56w-devel
yum -y install php56w-pdo php56w-xml php56w-gd php56w-gd.x86_64 php56w-ldap.x86_64 \
php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 php56w-opcache.x86_64

 

4, install PHP FPM

-y install php56w- yum FPM 
# is set PHP
- FPM boot PHP chkconfig - FPM ON
# start PHP
- FPM /etc/init.d/php-fpm Start

 

Note: If you want to change to php5.5 or 5.4 version, directly above 56w 55w or 54w into it

 

 

Guess you like

Origin www.cnblogs.com/morgan363/p/11865630.html