The default version is too low, manual installation has some trouble, want to use Yum install the following scenarios can be used:
1. Check the currently installed PHP package Yum List installed | grep php If there are PHP packages installed, first remove them 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_642.centos 5.X RPM-UVH http://mirror.webtatic.com /yum/el5/latest.rpm
CentOs 6.x
RPM-UVH http://mirror.webtatic.com/yum/el6/latest.rpm
CentOs 7.X
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 package installed above, reinstall
Rpm-qa | grep webstatic
RPM-E The package 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
Note: If you want to upgrade to 5.6 the above 55w to 56w on it.
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
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 the above 55w to 56w on it.
We want to use Yum to install PHP-FPM and compare the new version of Php,nginx,mysql-server, first we have to add a few sources for Yum, the CentOS default source inside the software is older, some software, libraries have not.
By the end of the configuration of the Yum source, it is easy to install the software below. It's y when you ask y/n when you install it.
Install PHP,PHP-FPM and PHP extensions:
- Yum install php php-fpm php-bcmatch php-gd php-mbstring php-mcrypt php-mysql
Install MySQL:
- Yum Install Mysql-server
Install Nginx:
- Yum Install Nginx
OK, everything is done, let's list all the configuration files involved (the following configuration files are automatically created by default, not created by us):
MySQL configuration file my.cnf path:/etc/my.cnf
Nginx configuration file nginx.conf path:/etc/nginx/nginx.conf
PHP config file php.ini path:/etc/php.ini
PHP-FPM configuration file php-fpm.conf path:/etc/php-fpm.conf
Centos7 under Yum installation php5.5,5.6,7.0