CentOS system comes with a low PHP version, if we need to use a high version of PHP, can not be compiled installation, directly with Yum installation will be very time-saving.
1. Check the currently installed PHP package
Yum List Installed | grep php
If you have a PHP package installed, remove them first
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
Or
Yum Remove php*
2. Install the Yum source
Centos 5.x Series
RPM-UVH http://mirror.webtatic.com/yum/el5/latest.rpm
CentOs 6.x Series
RPM-UVH http://mirror.webtatic.com/yum/el6/latest.rpm
CentOs 7.x Series
RPM-UVH https://mirror.webtatic.com/yum/el7/epel-release.rpm
RPM-UVH https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
If you want to remove the packages installed above, reinstall
Rpm-qa | grep webstatic
RPM-E The packages found above can be
3. Run Yum Install
Yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64
Yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64
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
Note: If you want to upgrade to 5.6, replace the 55w above with 56w.
4. Install PHP FPM
Yum Install PHP55W-FPM
Yum Install PHP56W-FPM
Yum Install PHP70W-FPM
Note: If you want to upgrade to 5.6, replace the 55w above with 56w.
CentOS under Yum install PHP 5.5, 5.6, 7.0