centos7 安装php5.6

1. 配置yum源

# rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/7/x86_64/e/epel-release-7-5.noarch.rpm 
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

2. 确认是否有要安装的php版本

# yum list --enablerepo=remi --enablerepo=remi-php56 | grep php

3. 安装php5.6

# 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

4. 确认php版本

php  -v  
Failed loading /usr/lib64/php/modules/ioncube_loader_lin_5.4.so:  /usr/lib64/php/modules/ioncube_loader_lin_5.4.so: undefined symbol: execute  
PHP 5.6.17 (cli) (built: Jan  6 2016 18:56:36)  
Copyright (c) 1997-2015 The PHP Group  
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies  
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans