Centos7安装php5.6 注:要先安装apache和mysql
#配置安装的yum源
# yum install epel-release
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
#查看可以安装的php包
# yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
#安装PHP5.6
# 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
用PHP命令查看版本。
# php -v
安装完成!