The PHP source that comes with CentOS is version 5.4. If you need to install PHP 5.4 Direct input yum install php-y can
Because PHP7 performance is greatly improved, this article chooses to install PHP7
If you have already installed PHP, delete the previous version and see if you have installed the PHP method:
Yum List installed |grep PHP
If there is an installation, remove it by the following method
Yum Remove php*
Enter PHP-V to see if the deletion is complete, and if the version number is not displayed, the deletion succeeds.
To install PHP7 steps:
1. Updating the Yum installation package
RPM-UVH https://mirror.webtatic.com/yum/el7/epel-release.rpm
RPM-UVH https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
2. Installation of PHP7 and related packages via Yum
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
If you need to install PHP-FPM
Yum Install PHP70W-FPM
Enter PHP-V after installation is complete
Represents PHP7 installation success.
Lamp Environment Construction (iii) installation of the----PHP7