update php version to 5.6

追加CentOS 7的epel及remi源:
# 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

检查当前安装的PHP包
yum list installed | grep php
如果有安装的PHP包,先删除他们
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64


yum源配置好了,下一步就安装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-gd php-redis

安装PHP-fpm
yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm

php --version
php-fpm

猜你喜欢

转载自www.cnblogs.com/sunnykwan/p/11741903.html