检查当前安装的PHP包
yum list installed | grep php
如果有安装的PHP包,先删除他们 这里一定要把上一步列出来的所有php包删除干净
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-fpm.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysqlnd.x86_64 php-pdo.x86_64 php-pear.noarch php-pecl-apcu.x86_64 php-pecl-gearman.x86_64 php-pecl-igbinary.x86_64 php-pecl-jsonc.x86_64 php-pecl-redis.x86_64 php-pecl-zip.x86_64 php-process.x86_64 php-xml.x86_6
配置yum源
yum install epel-release
yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
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-pecl-apcu php-pecl-redis
安装PHP-fpm
yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm