追加源
1.epel源:yum install epel-release
2.remi源:rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
查看源列表
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
安装PHP
1.安装yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-fpm
2.配置php-fpm。配置文件在/etc/php-fpm.conf和/etc/php-fpm.d/www.conf.
3.启动php-fpmxservice php-fpm start