1. 程式人生 > >nginx源碼包下載地址

nginx源碼包下載地址

nginx

http://nginx.org/en/download.html

穩定版1.12.1

http://nginx.org/download/nginx-1.12.1.tar.gz

穩定版1.10.3

http://nginx.org/download/nginx-1.10.3.tar.gz

從源碼包編譯

  • --prefix=path 定義安裝路徑

  • --sbin-path=path 定義可執行文件安裝路徑

  • --conf-path=path 定義配置文件路徑

  • --pid-path=path 定義nginx.pid文件路徑

  • --error-log-path=path 定義錯誤日誌文件路徑

  • --http-log-path=path 定義訪問日誌文件路徑

  • --build=name — sets an optional nginx build name.設置一個可選的Nginx建立名稱

  • --user=name 設置默認用戶為 nobody.

  • --group=name 設置默認組

  • --with-select_module或--without-select_module

  • 允許或禁止編譯服務器使用select()方法工作。如果平臺上沒有合適的方法找到,例如kqueue,epoll,或者/dev/poll,那麽這個模塊會自動編譯。

  • --with-poll_module或--without-poll_module

  • 允許或禁止服務器工作在poll()方式。如果平臺上沒有合適的方法像kqueue,epoll或者/dev/poll,那麽這個模塊會自動編譯。

  • poll和select實現功能差不多,但poll效率高,以後要多用poll

  • --without-http_gzip_module 禁止編譯壓縮HTTP服務器回復的模塊。要想編譯和運行這麽模塊,那麽需要zlib庫的支持。

  • --without-http_rewrite_module 禁止編譯HTTP重定向請求的模塊。為了編譯這個模塊,PCRE庫需要事先準備好。

  • --without-http_proxy_module 禁止編譯HTTP服務器代理模塊

  • --with-http_ssl_module 允許編譯支持HTTPS協議的模塊。默認沒編譯。為了編譯和運行這個模塊,OpenSSL庫是需要的。

  • --with-pcre=path

    指定pcre庫的位置

  • --with-pcre-jit 構建帶有“just-in-time compilation(運行時編譯執行的技術)”的pcre庫,支持 (1.1.12, the pcre_jit directive).

  • --with-zlib=path 指定zlib庫的位置

  • --with-cc-opt=parameters — sets additional parameters that will be added to the CFLAGS variable. When using the system PCRE library under FreeBSD, --with-cc-opt="-I /usr/local/include" should be specified. If the number of files supported by select() needs to be increased it can also be specified here such as this: --with-cc-opt="-D FD_SETSIZE=2048".

  • --with-ld-opt=parameters 設置在鏈接時候的額外的參數 (When using the system PCRE library under FreeBSD, --with-ld-opt="-L /usr/local/lib" should be specified.

本文出自 “菜鳥學習筆記” 博客,謝絕轉載!

nginx源碼包下載地址