1.環境參數:Linux:Centos6.5,Nginx:1.6.3
2.Nginx下載,下載網址:wget http://nginx.org/download/nginxtar.gz
3.依賴安裝
yum install pcre pcre-devel openssl openssl-devel -y
4.建立Nginx用戶和群組useradd nginx -s / sbin/nologin -M -g nginx
5.解壓縮Nginx
tar xf nginx-1.6.3.tar.gz
./configure --user=nginx --group=nginx
--prefix=/application/nginx1.6.3--with-http_stub_status_module --with-http_ssl_oo-T
make && make install
8.做軟連線
ln -s /application/nginx1.6.3/app /c lication/nginx /sbin/nginx
nginx -s stop
nginx -s stop
/application/ nginx/sbin/nginx -t
12.兩種檢查啟動是否成功方法
[root@cancer nginx]# 0.0:80 0.0. 0.0:* LISTEN 7853/nginx 0
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEnginx 7853 root 6u IPv4 466356 LISTEN)nginx 7854 nginx 6u IPv4 466356 0t0 TCP *:http (LISTEN)
以上就介紹了Nginx-163編譯安裝,包含了方面的內容,希望對PHP教學有興趣的朋友有幫助。