centosにphp5.6をインストールする方法

$ sudo rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

$ sudo sed -i ‘s/\(mirrorlist=http\)s/\1/’ /etc/yum.repos.d/epel.repo

$ sudo 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 –version

または、
# cd /opt/
# yum remove php*
# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# yum install php php-common –enablerepo=remi,remi-php56
# yum install php-mysqlnd php-mbstring php-gd php-pdo php-gd php-xml –enablerepo=remi,remi-php56
# yum install php-mcrypt –enablerepo=remi,remi-php56
# php -v