1. The current Nginx adoption is the source package installation method (Yum installation failed),: http://nginx.org/en/download.html
My installation package here is: nginx-1.12.0.tar.gz
2. Before installing Nginx, I need to install Pcre, the Pcre source package here is: pcre-8.35.tar.gz
File storage path:/home/nginx/pcre-8.35.tar.gz
Tar zxvf pcre-8.35.tar.gz
CD pcre-8.35
./configure--prefix=/usr/local/pcre
Make
Make install
3. source package installation Nginx; file storage path:/home/nginx/nginx-1.12.0.tar.gz
Tar zxvf nginx-1.12.0.tar.gz
CD nginx-1.12.0
./configure--prefix=/usr/local/nginx--without-http_memcached_module--with-http_stub_status_module -- with-pcre=/home/nginx/pcre-8.35
Note: here must add Pcre source code is located in the path, otherwise error.
Make
Make install
4. Yum install MySQL + PHP, before installing, install yum-downloadonly, download the MySQL and PHP installation package to the local and then install, convenient later set up the device can not be online.
4.1 Installing Yum-downloadonly
Yum install yum-downloadonly or yum install yum-plugin-downloadonly
4.2 Download MySQL
Yum install MySQL mysql-server mysql-devel--downloadonly--downloaddir=/home/phpmysql
4.3 Download php
Yum install php php-fpm php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml--downloadonly--downloaddir =/home/phpmysql/
4.4 Installing MySQL and PHP
cd/home/phpmysql/
RPM-IVH *.rpm--force
Installing and configuring the NGINX+PHP+MYSQL environment on CentOS6.3