配置yum源
CentOS 6.5
yum install epel-release
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
CentOS 7.0
yum install epel-release
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
安装PHP5.6
# php-opcache及php-pecl-apcu会有效的提高php执行速度;
yum install --enablerepo=remi-php56 php php-opcache php-pecl-apcu php-devel \
php-mbstring php-mcrypt php-mysql php-pecl-xdebug php-pecl-xhprof \
php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common
验证安装
php -v #查看PHP版本