nginx各個引數模塊介紹:(可能不齊全)
--user 指定啟動程式所屬用戶
--group 指定組
--prefix 指定安裝路徑
--sbin-path 設定nginx二進制檔案的路徑名
--conf-path 指定組態檔路徑
--error-log-path 錯誤日志檔案路徑
--http-log-path 指定訪問日志檔案路徑
--http-client-body-temp-path 設定存盤HTTP客戶端請求主體的臨時檔案路徑
--http-proxy-temp-path 設定存盤HTTP代理臨時檔案的路徑
--http-fastcgi-temp-path 設定存盤HTTP fastcgi的臨時檔案的路徑
--pid-path 設定nginx.pid檔案路徑
--lock-path 設定nginx.lock檔案路徑
--with-openssl 啟用SSL
--with-pcre 啟用正則運算式
--with-http_stub_status_module 安裝可以監控nginx狀態的模塊
--with-http_ssl_module 啟用SSL支持
--with-http_gzip_static_module 啟用gzip壓縮
1、創建nginx 使用用戶
useradd -s /sbin/nologin -M nginx
2、添加nginx的path路徑 nano /etc/profile
export NGINX_HOME=/soft/nginx
export PATH=$PATH:$NGINX_HOME/sbin
添加完后記得 source /etc/profile 一下 啟用
3、下載解壓略過,下面在nginx解壓目錄進行編譯安裝
1)、配置編譯引數
./configure \
--user=nginx \
--group=nginx \
--prefix=/soft/nginx \
--sbin-path=/soft/nginx/sbin/nginx \
--conf-path=/soft/nginx/nginx.conf \
--error-log-path=/soft/nginx/log/error.log \
--http-log-path=/soft/nginx/log/access.log \
--http-client-body-temp-path=/soft/nginx/tmp/client_body \
--http-proxy-temp-path=/soft/nginx/tmp/proxy \
--http-fastcgi-temp-path=/soft/nginx/tmp/fastcgi \
--pid-path=/soft/nginx/run/nginx.pid \
--lock-path=/soft/nginx/lock/subsys/nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_gzip_static_module \
--with-pcre \
--with-http_realip_module \
--with-http_sub_module \
--with-stream \
--with-stream=dynamic \
--with-stream_ssl_module \
--with-mail=dynamic \
--with-mail_ssl_module
2)、進行編譯
make
3)、進行安裝
make install
4、nginx 安裝情況查看
nginx -t
5、nginx 安裝模塊查看 V一定是大寫
nginx -V
6、nginx啟動
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/73273.html
標籤:其他
上一篇:layui有人用嗎?那個edit編輯器在蘋果手機的微信里用不了,點不開工具列的圖示
下一篇:npm : 無法將"npm"項識別為 cmdlet,函式,腳本檔案或可運行程式的名稱,請檢查名稱的拼寫,如果包括路徑,請保證路徑正確,然后再試一次。
