1. Environmental parameters: linux:centos6.5,nginx:1.6.3
2.Nginx download, download address: wget http://nginx.org/download/nginx-1.6.3.tar.gz
3. Dependent installation
Yum install pcre pcre-devel OpenSSL openssl-devel-y
4. Create Nginx Users and Groups
Groupadd Nginx
Useradd nginx-s/sbin/nologin-m-G nginx
5. Unzip the Nginx
Tar XF nginx-1.6.3.tar.gz
CD nginx-1.6.3
6. Compiling the Software
./configure \
--user=nginx \
--group=nginx \
--prefix=/application/nginx1.6.3 \
--with-http_stub_status_module \
--with-http_ssl_module
7. Installing the Software
Make && make install
8. Make a soft connection
Ln-s/application/nginx1.6.3//application/nginx
9.Nginx Start-up
/application/nginx/sbin/nginx
10.Nginx Stop and restart
Nginx-s stop
Nginx-s Reload
11. Check if Nginx is correct
/application/nginx/sbin/nginx -T
12. Two ways to check if a startup is successful
[Root@cancer nginx]# Netstat-lntup|grep 80
TCP 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7853/nginx
[Root@cancer nginx]# lsof-i: 80
COMMAND PID USER FD TYPE DEVICE size/off NODE NAME
Nginx 7853 root 6u IPv4 466356 0t0 TCP *:http (LISTEN)
Nginx 7854 nginx 6u IPv4 466356 0t0 TCP *:http (LISTEN)
The above describes the Nginx-163 compilation installation, including the aspects of the content, I hope the PHP tutorial interested in a friend helpful.