First, installation Preparation
First, because some PHP modules rely on some LIB libraries, you must install these LIB libraries before you install PHP.
Installing LIBXML2
Specific download link can go to http://xmlsoft.org/downloads.html query
# wget ftp://xmlsoft.org/libxml2/libxml2-2.9.3.tar.gz
# TAR-ZXVF Libxml2-2.9.3.tar.gz
# CD libxml2-2.9.3
#./configure--PREFIX=/USR/LOCAL/LIBXML2
# make
# make Install
Second, install PHP
Before installing, it's a good idea to check if you have PHP installed
$ find-name PHP
If the system already has PHP installed, first uninstall the
$ yum Remove php
First enter the/usr/local directory
$ cd/usr/local
Download the latest version of Nginx from official website
$ wget http://nginx.org/download/nginx-1.8.0.tar.gz
Unzip the Nginx compression pack
$ TAR-ZXVF nginx-1.8. 0. tar.gz
will produce a nginx-1.8.0 directory, then enter the nginx-1.8.0 directory
$ cd nginx-1.8. 0
Next install, use the--prefix parameter to specify the Nginx installation directory, make, make install installation
$./configure--prefix=/usr/local/nginx$ make$ make install
If there is no error, after the successful completion, it is best to look at the Nginx installation directory
$ Whereis Nginx
Once the installation is complete, you can start or stop it by entering the post-installation directory (/usr/local/nginx).
$ cd/usr/local/nginx$ sbin/nginx
In this, the use of CentOS installation Nginx has been completed, in fact, it is quite simple to see.
CENTOS7 Installation configuration PHP