以下是CentOS 7.0的源。
yum install epel-release
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
使用yum list命令查看可安装的包(Packege)。
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php*
安装PHP5.6
yum源配置好了,下一步就安装PHP5.6。
yum install --enablerepo=remi --enablerepo=remi-php56 php php-fpm php-xml php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof
安装PHP7.0
yum install --enablerepo=remi --enablerepo=remi-php70 php php-fpm php-xml php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof
用PHP命令查看版本。