yum -y install epel-release
2. Centos 5.X:
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpmCentOs 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
3. 删除之前的php版本
yum remove php php-common
4. 安装php7yum install php70w
5. 安装完成的查看php的版本,如下图所示:
php -v
6. 重启apache做事,重新加载php7
service httpd restart
7. 末了,写一个php探针看一下php干系信息如下图所示,代码如下
<?php phpinfo();?>