nginx學習筆記-編譯選項說明

參數名稱 備註
–prefix=value 指向安裝目錄
–sbin-path 指向(執行)程序文件(nginx)
–conf-path= 指向配置文件(nginx.conf)
–error-log-path= 指向錯誤日誌目錄
–pid-path= 指向 pid 文件(nginx.pid)
–lock-path= 指向 lock 文件(nginx.lock)(安裝文件鎖定,防止安裝文件被別人利用,或自己誤操作。)進程ID文件
–user= 指定程序運行時的用戶名
–group= 指定程序運行時的用戶組名
–builddir= 指向編譯目錄
–with-rtsig_module 啓用 rtsig 模塊支持(實時信號)
–with-select_module 啓用 select 模塊支持(一種輪詢模式,不推薦在高載環境下使用)禁用:–without-select_module
–with-poll_module 啓用 poll 模塊支持(功能與 select 相同,與 select 特性相同,爲一種輪詢模式,不推薦在高載環境下使用)
–with-file-aio 啓用 file aio 支持(一種 APL 文件傳輸格式)
–with-ipv6 啓用 ipv6 支持
–add-module= 啓用外部模塊支持
–with-cc= 指向 C 編譯器路徑
–with-cpp= 指向 C 預處理路徑
–with-cc-opt= 設置 C 編譯器參數
–with-ld-opt= 設置連接文件參數
–with-cpu-opt= 指定編譯的 CPU,可用的值爲:pentium, pentiumpro, pentium3, pentium4, athlon, opteron, amd64, sparc32, sparc64, ppc64
–without-pcre 禁用 PCRE 庫
–with-pcre 啓用 PCRE 庫
–with-pcre= 指向 PCRE 庫文件目錄
–with-pcre-opt= 在編譯時爲 PCRE 庫設置附加參數
–with-md5= 指向 MD5 庫文件目錄(消息摘要算法第五版,用以提供消息的完整性保護)
–with-md5-opt= 在編譯時爲 MD5 庫設置附加參數
–with-md5-asm 使用 MD5 彙編源
–with-sha1= 指向 sha1 庫目錄(數字簽名算法,主要用於數字簽名)
–with-sha1-opt= 在編譯時爲 sha1 庫設置附加參數
–with-sha1-asm 使用 sha1 彙編源
–with-perl= 設定 perl 庫文件路徑
–with-zlib= 指向 zlib 庫目錄
–with-zlib-opt= 在編譯時爲 zlib 設置附加參數
–with-zlib-asm= 爲指定的 CPU 使用 zlib 彙編源進行優化,CPU 類型爲 pentium, pentiumpro
–with-libatomic 爲原子內存的更新操作的實現提供一個架構
–with-libatomic= 指向 libatomic_ops 安裝目錄
–with-openssl= 指向 openssl 安裝目錄
–with-openssl-opt 在編譯時爲 openssl 設置附加參數
–with-debug 啓用 debug 日誌
–with-http_ssl_module 啓用 ngx_http_ssl_module 支持(使支持 HTTPS 請求,需已安裝 openssl)
–with-http_realip_module 啓用 ngx_http_realip_module 支持(這個模塊允許從請求標頭更改客戶端的 IP 地址值,默認爲關)
–with-http_addition_module 啓用 ngx_http_addition_module 支持(作爲一個輸出過濾器,支持不完全緩衝,分部分響應請求)
–with-http_xslt_module 啓用 ngx_http_xslt_module 支持(過濾轉換 XML 請求)
–with-http_image_filter_module 啓用 ngx_http_image_filter_module 支持(傳輸 JPEG/GIF/PNG 圖片的一個過濾器)(默認爲不啓用。GD 庫要用到)
–with-http_geoip_module 啓用 ngx_http_geoip_module 支持(該模塊創建基於與 MaxMind GeoIP 二進制文件相配的客戶端 IP 地址的 ngx_http_geoip_module 變量)
–with-http_sub_module 啓用 ngx_http_sub_module 支持(允許用一些其他文本替換 Nginx 響應中的一些文本)
–with-http_dav_module 啓用 ngx_http_dav_module 支持(增加 PUT、DELETE、MKCOL 創建集合,COPY 和 MOVE 方法)默認情況下爲關閉,需編譯開啓
–with-http_flv_module 啓用 ngx_http_flv_module 支持(提供尋求內存使用基於時間的偏移量文件)
–with-http_gzip_static_module 啓用 ngx_http_gzip_static_module 支持(在線實時壓縮輸出數據流)
–with-http_random_index_module 啓用 ngx_http_random_index_module 支持(從目錄中隨機挑選一個目錄索引)
–with-http_secure_link_module 啓用 ngx_http_secure_link_module 支持(計算和檢查要求所需的安全鏈接網址)
–with-http_degradation_module 啓用 ngx_http_degradation_module 支持(允許在內存不足的情況下返回204或444碼)
–with-http_stub_status_module 啓用 ngx_http_stub_status_module 支持(獲取 Nginx 自上次啓動以來的工作狀態)
–without-http_charset_module 禁用 ngx_http_charset_module 支持(重新編碼 WEB 頁面,但只能是一個方向–服務器端到客戶端,並且只有一個字節的編碼可以被重新編碼)
–without-http_gzip_module 禁用 ngx_http_gzip_module 支持(該模塊同 --with-http_gzip_static_module 功能一樣)
–without-http_ssi_module 禁用 ngx_http_ssi_module 支持(該模塊提供了一個在輸入端處理處理服務器包含文件(SSI)的過濾器,目前支持 SSI 命令的列表是不完整的)
–without-http_userid_module 禁用 ngx_http_userid_module 支持(該模塊用來處理用來確定客戶端後續請求的 cookie )
–without-http_access_module 禁用 ngx_http_access_module 支持(該模塊提供了一個簡單的基於主機的訪問控制。允許/拒絕基於 IP 地址)
–without-http_auth_basic_module 禁用 ngx_http_auth_basic_module(該模塊是可以使用用戶名和密碼基於 HTTP 基本認證方法來保護你的站點或其部分內容)
–without-http_autoindex_module 禁用 ngx_http_autoindex_module 支持(該模塊用於自動生成目錄列表,只在 ngx_http_index_module 模塊未找到索引文件時發出請求。)
–without-http_geo_module 禁用 ngx_http_geo_module 支持(創建一些變量,其值依賴於客戶端的IP地址)
–without-http_map_module 禁用 ngx_http_map_module 支持(使用任意的鍵/值對設置配置變量)
–without-http_split_clients_module 禁用 ngx_http_split_clients_module 支持(該模塊用來基於某些條件劃分用戶。條件如:ip地址、報頭、cookies等等)
–without-http_referer_module 禁用 ngx_http_referer_module支持(該模塊用來過濾請求,拒絕報頭中 Referer 值不正確的請求)
–without-http_rewrite_module 禁用 ngx_http_rewrite_module ,鏈接重寫
–without-http_proxy_module 禁用 ngx_http_proxy_module 支持(有關代理服務器)
–without-http_fastcgi_module 禁用 ngx_http_fastcgi_module 支持(該模塊允許 Nginx 與 FastCGI 進程交互,並通過傳遞參數來控制 FastCGI 進程工作。 )FastCGI 一個常駐型的公共網關接口。
–without-http_uwsgi_module 禁用 ngx_http_uwsgi_module 支持(該模塊用來醫用uwsgi協議,uWSGI服務器相關)
–without-http_scgi_module 禁用 ngx_http_scgi_module支持
–without-http_memcached_module 禁用 ngx_http_memcached_module 支持(該模塊用來提供簡單的緩存,以提高系統效率)
-without-http_limit_zone_module 禁用 ngx_http_limit_zone_module 支持(該模塊可以針對條件,進行會話的併發連接數控制)
–without-http_limit_req_module 禁用 ngx_http_limit_req_module 支持(該模塊允許你對於一個地址進行請求數量的限制用一個給定的session或一個特定的事件)
–without-http_empty_gif_module 禁用 ngx_http_empty_gif_module 支持(該模塊在內存中常駐了一個1*1的透明GIF圖像,可以被非常快速的調用)
–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 支持(該模塊使nginx可以直接使用perl或通過ssi調用perl)
–with-perl_modules_path= 設定 perl 模塊路徑
–http-log-path= 設定 access log 路徑
–http-client-body-temp-path= 設定 HTTP 客戶端請求臨時文件路徑
–http-proxy-temp-path= 設定 HTTP 代理臨時文件路徑
–http-fastcgi-temp-path= 設定 HTTP Fastcgi 臨時文件路徑
–http-uwsgi-temp-path= 設定 HTTP uwsgi 臨時文件路徑
–http-scgi-temp-path= 設定 HTTP scgi 臨時文件路徑
–without-http 禁用 HTTP server 功能
–without-http-cache 禁用 HTTP Cache 功能
–with-mail 啓用 POP3/IMAP4/SMTP 代理模塊支持
–with-mail_ssl_module 啓用 ngx_mail_ssl_module 支持
–without-mail_pop3_module 禁用 POP3 協議
–without-mail_imap_module 禁用 IMAP 協議
–without-mail_smtp_module 禁用 SMTP 協議
–with-google_perftools_module 啓用 ngx_google_perftools_module 支持(調試用,剖析程序性能瓶頸)
–with-cpp_test_module 啓用 ngx_cpp_test_module 支持

以下爲英文

參數名稱 備註
–prefix=PATH set installation prefix
–sbin-path=PATH set nginx binary pathname
–modules-path=PATH set modules path
–conf-path=PATH set nginx.conf pathname
–error-log-path=PATH set error log pathname
–pid-path=PATH set nginx.pid pathname
–lock-path=PATH set nginx.lock pathname
–user=USER set non-privileged user for worker processes
–group=GROUP set non-privileged group for worker processes
–build=NAME set build name
–builddir=DIR set build directory
–with-select_module enable select module
–without-select_module disable select module
–with-poll_module enable poll module
–without-poll_module disable poll module
–with-threads enable thread pool support
–with-file-aio enable file AIO support
–with-http_ssl_module enable ngx_http_ssl_module
–with-http_v2_module enable ngx_http_v2_module
–with-http_realip_module enable ngx_http_realip_module
–with-http_addition_module enable ngx_http_addition_module
–with-http_xslt_module enable ngx_http_xslt_module
–with-http_xslt_module=dynamic enable dynamic ngx_http_xslt_module
–with-http_image_filter_module enable ngx_http_image_filter_module
–with-http_image_filter_module=dynamic enable dynamic ngx_http_image_filter_module
–with-http_geoip_module enable ngx_http_geoip_module
–with-http_geoip_module=dynamic enable dynamic ngx_http_geoip_module
–with-http_sub_module enable ngx_http_sub_module
–with-http_dav_module enable ngx_http_dav_module
–with-http_flv_module enable ngx_http_flv_module
–with-http_mp4_module enable ngx_http_mp4_module
–with-http_gunzip_module enable ngx_http_gunzip_module
–with-http_gzip_static_module enable ngx_http_gzip_static_module
–with-http_auth_request_module enable ngx_http_auth_request_module
–with-http_random_index_module enable ngx_http_random_index_module
–with-http_secure_link_module enable ngx_http_secure_link_module
–with-http_degradation_module enable ngx_http_degradation_module
–with-http_slice_module enable ngx_http_slice_module
–with-http_stub_status_module enable ngx_http_stub_status_module
–without-http_char set_module
–without-http_gzip_module disable ngx_http_gzip_module
–without-http_ssi_module disable ngx_http_ssi_module
–without-http_userid_module disable ngx_http_userid_module
–without-http_access_module disable ngx_http_access_module
–without-http_auth_basic_module disable ngx_http_auth_basic_module
–without-http_mirror_module disable ngx_http_mirror_module
–without-http_autoindex_module disable ngx_http_autoindex_module
–without-http_geo_module disable ngx_http_geo_module
–without-http_map_module disable ngx_http_map_module
–without-http_split_clients_module disable ngx_http_split_clients_module
–without-http_referer_module disable ngx_http_referer_module
–without-http_rewrite_module disable ngx_http_rewrite_module
–without-http_proxy_module disable ngx_http_proxy_module
–without-http_fastcgi_module disable ngx_http_fastcgi_module
–without-http_uwsgi_module disable ngx_http_uwsgi_module
–without-http_scgi_module disable ngx_http_scgi_module
–without-http_grpc_module disable ngx_http_grpc_module
–without-http_memcached_module disable ngx_http_memcached_module
–without-http_limit_conn_module disable ngx_http_limit_conn_module
–without-http_limit_req_module disable ngx_http_limit_req_module
–without-http_empty_gif_module disable ngx_http_empty_gif_module
–without-http_browser_module disable ngx_http_browser_module
–without-http_upstream_hash_module disable ngx_http_upstream_hash_module
–without-http_upstream_ip_hash_module disable ngx_http_upstream_ip_hash_module
–without-http_upstream_least_conn_module disable ngx_http_upstream_least_conn_module
–without-http_upstream_keepalive_module disable ngx_http_upstream_keepalive_module
–without-http_upstream_zone_module disable ngx_http_upstream_zone_module
–with-http_perl_module enable ngx_http_perl_module
–with-http_perl_module=dynamic enable dynamic ngx_http_perl_module
–with-perl_modules_path=PATH set Perl modules path
–with-perl=PATH set perl binary pathname
–http-log-path=PATH set http access log pathname
–http-client-body-temp-path=PATH set path to store http client request body temporary files
–http-proxy-temp-path=PATH set path to store http proxy temporary files
–http-fastcgi-temp-path=PATH set path to store http fastcgi temporary files
–http-uwsgi-temp-path=PATH set path to store http uwsgi temporary files
–http-scgi-temp-path=PATH set path to store http scgi temporary files
–without-http disable HTTP server
–without-http-cache disable HTTP cache
–with-mail enable POP3/IMAP4/SMTP proxy module
–with-mail=dynamic enable dynamic POP3/IMAP4/SMTP proxy module
–with-mail_ssl_module enable ngx_mail_ssl_module
–without-mail_pop3_module disable ngx_mail_pop3_module
–without-mail_imap_module disable ngx_mail_imap_module
–without-mail_smtp_module disable ngx_mail_smtp_module
–with-stream enable TCP/UDP proxy module
–with-stream=dynamic enable dynamic TCP/UDP proxy module
–with-stream_ssl_module enable ngx_stream_ssl_module
–with-stream_realip_module enable ngx_stream_realip_module
–with-stream_geoip_module enable ngx_stream_geoip_module
–with-stream_geoip_module=dynamic enable dynamic ngx_stream_geoip_module
–with-stream_ssl_preread_module enable ngx_stream_ssl_preread_module
–without-stream_limit_conn_module disable ngx_stream_limit_conn_module
–without-stream_access_module disable ngx_stream_access_module
–without-stream_geo_module disable ngx_stream_geo_module
–without-stream_map_module disable ngx_stream_map_module
–without-stream_split_clients_module disable ngx_stream_split_clients_module
–without-stream_return_module disable ngx_stream_return_module
–without-stream_upstream_hash_module disable ngx_stream_upstream_hash_module
–without-stream_upstream_least_conn_module disable ngx_stream_upstream_least_conn_module
–without-stream_upstream_zone_module disable ngx_stream_upstream_zone_module
–with-google_perftools_module enable ngx_google_perftools_module
–with-cpp_test_module enable ngx_cpp_test_module
–add-module=PATH enable external module
–add-dynamic-module=PATH enable dynamic external module
–with-compat dynamic modules compatibility
–with-cc=PATH set C compiler pathname
–with-cpp=PATH set C preprocessor pathname
–with-cc-opt=OPTIONS set additional C compiler options
–with-ld-opt=OPTIONS set additional linker options
–with-cpu-opt=CPU build for the specified CPU, valid values:pentium, pentiumpro, pentium3, pentium4,athlon, opteron, sparc32, sparc64, ppc64
–without-pcre disable PCRE library usage
–with-pcre force PCRE library usage
–with-pcre=DIR set path to PCRE library sources
–with-pcre-opt=OPTIONS set additional build options for PCRE
–with-pcre-jit build PCRE with JIT compilation support
–with-zlib=DIR set path to zlib library sources
–with-zlib-opt=OPTIONS set additional build options for zlib
–with-zlib-asm=CPU use zlib assembler sources optimized for the specified CPU, valid values:pentium, pentiumpro
–with-libatomic force libatomic_ops library usage
–with-libatomic=DIR set path to libatomic_ops library sources
–with-openssl=DIR set path to OpenSSL library sources
–with-openssl-opt=OPTIONS set additional build options for OpenSSL
–with-debug enable debug logging
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章