1. 程式人生 > >《基於Nginx的中介軟體架構》學習筆記---4.nginx編譯引數詳細介紹

《基於Nginx的中介軟體架構》學習筆記---4.nginx編譯引數詳細介紹

通過nginx -V檢視編譯時引數:

在nginx安裝目錄下,通過./configure --help,檢視對應版本ngnix編譯時支援的所有引數:

Nginx編譯引數詳細介紹:

--help 顯示本提示資訊

--prefix=PATH 設定安裝目錄

--sbin-path=PATH 設定程式檔案目錄

--conf-path=PATH 設定配置檔案(nginx.conf)目錄

--error-log-path=PATH 設定錯誤日誌目錄

--pid-path=PATH 設定pid檔案(nginx.pid)目錄

--lock-path=PATH 設定lock檔案(nginx.lock
)目錄 --user=USER 設定程式執行的使用者環境(www) --group=GROUP 設定程式執行的組環境(www) --build=NAME  設定程式編譯名稱 --builddir=DIR 設定程式編譯目錄 --with-rtsig_module 允許rtsig模組 --with-select_module 允許select模組(一種輪詢模式,不推薦用在高載環境) --without-select_module 不使用select模組 --with-poll_module 允許poll模組(一種輪詢模式,不推薦用在高載環境) --without-poll_module 不使用poll模組
--with-threads  允許支援的執行緒池執行緒數 --with-http_ssl_module 允許ngx_http_ssl_module模組(Apache對應:mod_ssl) --with-http_realip_module 允許ngx_http_realip_module模組(mod_rpaf) --with-http_addition_module 允許ngx_http_addition_module模組(mod_layout) --with-http_xslt_module 允許ngx_http_xslt_module模組 --with-http_sub_module 允許ngx_http_sub_module模組
--with-http_dav_module 允許ngx_http_dav_module模組(mod_dav) --with-http_flv_module 允許ngx_http_flv_module模組(mod_flvx) --with-http_gzip_static_module 允許ngx_http_gzip_static_module模組(mod_dflate) --with-http_random_index_module 允許ngx_http_random_index_module模組(mod_autoindex) --with-http_stub_status_module 允許ngx_http_stub_status_module模組(mod_status) --without-http_charset_module 不使用ngx_http_charset_module模組 --without-http_gzip_module 不使用ngx_http_gzip_module模組 --without-http_ssi_module 不使用ngx_http_ssi_module模組 --without-http_userid_module 不使用ngx_http_userid_module模組 --without-http_access_module 不使用ngx_http_access_module模組 --without-http_auth_basic_module 不使用ngx_http_auth_basic_module模組 --without-http_autoindex_module 不使用ngx_http_autoindex_module模組 --without-http_geo_module 不使用ngx_http_geo_module模組 --without-http_map_module 不使用ngx_http_map_module模組 --without-http_referer_module 不使用ngx_http_referer_module模組 --without-http_rewrite_module 不使用ngx_http_rewrite_module模組 --without-http_proxy_module 不使用ngx_http_proxy_module模組 --without-http_fastcgi_module 不使用ngx_http_fastcgi_module模組 --without-http_memcached_module 不使用ngx_http_memcached_module模組 --without-http_limit_zone_module 不使用ngx_http_limit_zone_module模組 --without-http_empty_gif_module 不使用ngx_http_empty_gif_module模組 --without-http_browser_module 不使用ngx_http_browser_module模組 --without-http_upstream_ip_hash_module 不使用ngx_http_upstream_ip_hash_module模組 --with-http_perl_module 允許ngx_http_perl_module模組 --with-perl_modules_path=PATH 設定perl模組路徑 --with-perl=PATH 設定perl庫檔案路徑 --http-log-path=PATH 設定access log檔案路徑 --http-client-body-temp-path=PATH 設定客戶端請求臨時檔案路徑 --http-proxy-temp-path=PATH 設定http proxy臨時檔案路徑 --http-fastcgi-temp-path=PATH 設定http fastcgi臨時檔案路徑 --without-http 不使用HTTP server功能 --with-mail 允許POP3/IMAP4/SMTP代理模組 --with-mail_ssl_module 允許ngx_mail_ssl_module模組 --without-mail_pop3_module 不允許ngx_mail_pop3_module模組 --without-mail_imap_module 不允許ngx_mail_imap_module模組 --without-mail_smtp_module 不允許ngx_mail_smtp_module模組 --with-google_perftools_module 允許ngx_google_perftools_module模組(除錯用) --with-cpp_test_module 允許ngx_cpp_test_module模組 --add-module=PATH 允許使用外部模組,以及路徑 --with-cc=PATH 設定C編譯器路徑 --with-cpp=PATH 設定C預處理路徑 --with-cc-opt=OPTIONS 設定C編譯器引數 --with-ld-opt=OPTIONS 設定連線檔案引數 --with-cpu-opt=CPU 為指定CPU優化,可選引數有:           pentium, pentiumpro, pentium3, pentium4,           athlon, opteron, sparc32, sparc64, ppc64 --without-pcre 不使用pcre庫檔案 --with-pcre=DIR 設定PCRE庫路徑 --with-pcre-opt=OPTIONS 設定PCRE執行引數 --with-md5=DIR 設定md5庫檔案路徑 --with-md5-opt=OPTIONS 設定md5執行引數 --with-md5-asm 使用md5原始檔編譯 --with-sha1=DIR 設定sha1庫檔案路徑 --with-sha1-opt=OPTIONS 設定sha1執行引數 --with-sha1-asm 使用sha1原始檔編譯 --with-zlib=DIR 設定zlib庫檔案路徑 --with-zlib-opt=OPTIONS 設定zlib執行引數 --with-zlib-asm=CPU 使zlib對特定的CPU進行優化,可選引數:           pentium, pentiumpro --with-openssl=DIR 設定OpenSSL庫檔案路徑 --with-openssl-opt=OPTIONS 設定OpenSSL執行引數 --with-debug 允許除錯日誌

補充:centos下如何檢視yum安裝的軟體路徑:

1、rpm -qa | grep 軟體包名

2、rpm -ql 第一步的結果

例如: