默认的版本太低了,手动安装有一些麻烦,想采用Yum安装的可以使用下面的方案:
1.检查当前安装的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
CentOs 6.x
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64
4.安装PHP FPM
yum install php55w-fpm
yum install php56w-fpm
yum install php70w-fpm
yum install php70w-devel
yum install gcc-c++
yum install gcc
yum install libtool
php -dvld.active=1 test.php