1.检查安装环境删除5.4.16版本的php
rpm -qa|grep php
php-pdo-5.4.16-46.el7.x86_64
php-cli-5.4.16-46.el7.x86_64
php-ldap-5.4.16-46.el7.x86_64
php-mbstring-5.4.16-46.el7.x86_64
php-5.4.16-46.el7.x86_64
php-xml-5.4.16-46.el7.x86_64
php-mysql-5.4.16-46.el7.x86_64
php-common-5.4.16-46.el7.x86_64
php-fpm-5.4.16-46.el7.x86_64
php-bcmath-5.4.16-46.el7.x86_64
php-gd-5.4.16-46.el7.x86_64
yum remove php*5.4.16* -y
rpm -qa|grep php
2.安装扩展yum源以及remi资源包
yum install epel-release -y
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum repolist|grep remi
remi-safe Safe Remi's RPM repository for Enterprise Linux 7 - x86_64
3.安装php-httpd等模块
yum --enablerepo=remi-php73 install \
php-xml php-soap php-xmlrpc php-mbstring \
php-json php-gd php-mcrypt
测试一下应该有php模块了
httpd -M|grep php
php7_module (shared)