First, delete the old version if you have already installed PHP, delete the previous version. The check method is as follows: yum list installed | grep php then remove the installed package such as 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 depending on the name of the installation list displayed, the corresponding deletion of the installation of the new version 1. Update Yum Install package CENTOS 7.XRPM -UVH HTTPS://MIRROR.WEBTATIC.COM/YUM/EL7/EPEL-RELEASE.RPMRPM -UVH https://mirror.webtatic.com/yum/el7/webtatic-release.rpmcentos 6.xrpm -uvh http:// mirror.webtatic.com/yum/el6/latest.rpmcentos 5.xrpm -uvh http://mirror.webtatic.com/yum/el5/ latest.rpm2. the installation of PHP and other components via the cloud 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_64yum install PHP70W-FPM Other required components are installed on their own. Third, other versions of PHP installation if you want to install php5.5 or 5. version 6, replace the above php70w with php55w or php56w.
This article from "Li Shilong" blog, declined reprint!
CentOS7.4 installing php7.0 via Yum