centos7安装php56

centos7 install php56

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install yum-utils
yum install php56

检查已安装版本的扩展命令

php56 --version
php56 --modules

启用php-fpm

vi /etc/yum.repos.d/remi.repo

# 找到remi和remi-php56,将enabled=0修改为enabled=1

[remi]
name=Remi’s RPM repository for Enterprise Linux 7 – $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
…
[remi-php56]
name=Remi’s PHP 5.6 RPM repository for Enterprise Linux 7 – $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php56/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/php56/mirror
# WARNING: If you enable this repository, you must also enable “remi”
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

yum install php-fpm
systemctl enable php-fpm
systemctl start php-fpm