centos7系統(tǒng)yum安裝PHP
安裝不同PHP版本需要提供源.
PHP源:http://m.lncdfzh.com.cn/
http://m.lncdfzh.com.cn/


安裝:
#安裝epel源
yum install epel-release
#安裝PHP源,網(wǎng)站使用國內(nèi)鏡像
rpm -ivh http://m.lncdfzh.com.cn/remi/enterprise/remi-release-7.rpm
#查看啟用情況
yum list --enablerepo=remi --enablerepo=remi-php56
#安裝PHP56及相關模塊組件
yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common --skip-broken
安裝時候可以不用帶 "-y"參數(shù),可以檢查看下對應的php是不是正確
啟動加開啟自啟
systemctl enable php-fpm --new
檢查安裝的PHP:
yum list installed | grep php