1.php -v 查看当前版本
2.升级软件仓库
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-common
4.安装php 7.1版本 装多少版本就把数字改成多少
yum install -y php71w php71w-mysql php71w-mysqli php71w-opcache php71w-xml php71w-mcrypt php71w-gd php71w-devel php71w-MySQL php71w-intl php71w-mbstring
5.重启httpd
service httpd restart