Centos 6/7 升级 PHP 5.6 到 7.1/7.2
php -v
yum list installed | grep php
#Centos 5.X:
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
#CentOs 6.x:
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
#CentOs 7.X:
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
service php-fpm stop
yum install php71w php71w-cli php71w-common php71w-devel php71w-embedded php71w-fpm php71w-gd php71w-mbstring php71w-mysqlnd php71w-opcache php71w-pdo php71w-xml php71w-ldap php71w-mcrypt
php php-cli php-common php-devel php-gd php-imap php-ldap php-mbstring php-mcrypt php-mssql php-mysql php-odbc php-pdo php-pear php-pecl-apc php-process php-snmp php-soap php-xml php-xmlrpc
php-pecl-geoip php-pear-Console-Color php-pear-Console-Table php-symfony-class-loader php-symfony-common php-symfony-yaml
upgrade to
mod_php71w.x86_64 0:7.1.27-1.w6 php71w-cli.x86_64 0:7.1.27-1.w6 php71w-common.x86_64 0:7.1.27-1.w6
php71w-devel.x86_64 0:7.1.27-1.w6 php71w-embedded.x86_64 0:7.1.27-1.w6 php71w-fpm.x86_64 0:7.1.27-1.w6
php71w-gd.x86_64 0:7.1.27-1.w6 php71w-ldap.x86_64 0:7.1.27-1.w6 php71w-mbstring.x86_64 0:7.1.27-1.w6
php71w-mcrypt.x86_64 0:7.1.27-1.w6 php71w-mysqlnd.x86_64 0:7.1.27-1.w6 php71w-opcache.x86_64 0:7.1.27-1.w6
php71w-pdo.x86_64 0:7.1.27-1.w6 php71w-xml.x86_64 0:7.1.27-1.w6