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


安裝:
#安裝epel源
yum install epel-release
#安裝PHP源,網(wǎng)站使用國(guó)內(nèi)鏡像
rpm -ivh http://www.tjdsmy.cn/remi/enterprise/remi-release-7.rpm
#查看啟用情況
yum list --enablerepo=remi --enablerepo=remi-php56
#安裝PHP56及相關(guān)模塊組件
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
安裝時(shí)候可以不用帶 "-y"參數(shù),可以檢查看下對(duì)應(yīng)的php是不是正確
啟動(dòng)加開啟自啟
systemctl enable php-fpm --new
檢查安裝的PHP:
yum list installed | grep php