在Linux上安装Nginx需要执行Configure脚本,该脚本需要做一些参数说明:
选项 |
说明
--prefix=<path> 指定Nginx软件的安装路径,若不指定默认安装在/usr/local/nginx/目录 --sbin-path=<path> 指定Nginx可执行文件安装路径,只能在安装时指定,若不指定默认为<prefix>/sbin/nginx/目录 --conf-path=<path> 在未给定-c选项下,指定默认的nginx.conf路径,若不指定默认为<prefix>/conf/ --pid-path=<path> 在nginx.conf中没有指定pid指令的情况下,默认的nginx.pid的路径。如果没有指定,默认为 <prefix>/logs/nginx.pid --lock-path=<path> nginx.lock文件的路径,默认为<prefix>/logs/nginx.lock --error-log-path=<path> 在nginx.conf中没有指定error_log指令的情况下,默认的错误日志的路径。如果没有指定,默认为 <prefix>/logs/error.log --http-log-path=<path> 在nginx.conf中没有指定access_log指令的情况下,默认的访问日志的路径。如果没有指定,默认为 <prefix>/logs/access.log --user=<user> 在nginx.conf中没有指定user指令的情况下,默认的nginx使用的用户。如果没有指定,默认为 nobody --group=<group> 在nginx.conf中没有指定user指令的情况下,默认的nginx使用的组。如果没有指定,默认为 nobody --builddir=<dir> 指定编译的目录 --with-debug 启用调试日志 --add-module=<path> 在目录中添加第三方模块 --with-poll_module 启用poll模块 --without-poll_module 禁止poll模块 --with-select_module 启用select信号处理模式 --without-select_module 禁止select信号处理模式 --with-http_ssl_module 启用HTTP的ssl模块 --with-http_realip_module 启用HTTP的realip模块,默认不启用 --with-http_addition_module 启用HTTP的addition模块,默认不启用 --with-http_sub_module 启用HTTP的sub模块,默认不启用 --with-http_dav_module 启用HTTP的dav模块,默认不启用 --with-http_flv_module 启用HTTP的flv模块,默认不启用 --with-http_stub_status_module 启用Server Status页,默认不启用 --with-http_perl_module 启用HTTP的perl模块,默认不启用 --with-perl_modules_path=<path> 指定perl模块的路径 --with-perl=<path> 指定perl执行文件的路径 --without-http_charset_module 禁用HTTP的charset模块,默认启用 --without-http_gzip_module 禁用HTTP的gzip模块,默认启用 --without-http_ssi_module 禁用HTTP的ssi模块,默认启用 --without-http_userid_module 禁用HTTP的userid模块,默认启用 --without-http_access_module 禁用HTTP的access模块,默认启用 --without-http_auth_basic_module 禁用HTTP的auth basic模块,默认启用 --without-http_autoindex_module 禁用HTTP的autoindex模块,默认启用 --without-http_geo_module 禁用HTTP的geo模块,默认启用 --without-http_map_module 禁用HTTP的map模块,默认启用 --without-http_referer_module 禁用HTTP的referer模块,默认启用 --without-http_rewrite_module 禁用HTTP的rewrite模块,默认启用 --without-http_proxy_module 禁用HTTP的proxy模块,默认启用 --without-http_fastcgi_module 禁用HTTP的fastcgi模块,默认启用 --without-http_memcached_module 禁用HTTP的memcached模块,默认启用 --without-http_limit_zone_module 禁用HTTP的limit zone模块,默认启用 --without-http_empty_gif_module 禁用HTTP的empty gif模块,默认启用 --without-http_browser_module 禁用HTTP的browser模块,默认启用 --without-http_upstream_ip_hash_module 禁用HTTP的upstream ip hash模块,默认启用 --http-client-body-temp-path=<path> 存放HTTP访问客户端请求报文的临时文件的路径 --http-proxy-temp-path=<path> 启用HTTP的proxy模块后,指定存放HTTP代理临时文件的路径 --http-fastcgi-temp-path=<path> 启用HTTP的fastcgi模块后,指定存放fastcgi模块临时文件路径 --without-http 禁用HTTP Server --with-mail 启用IMAP4/POP3/SMTP代理模块 --with-mail_ssl_module 启用ngx_mail_ssl_module --with-cc=<path> 指定C编译器的路径 --with-cpp=<path> 指定C预处理器的路径 --with-cc-opt=<options> 为CFLGS变量添加额外的参数,保证Nginx源代码及其模块可以正确编译 --with-ld-opt=<path> 为部分Nginx软件的模块编译指定链接库目录 --with-cpu-opt=<cpu> 为特定的CPU编译Nginx源码 --with-pcre=<path> 指定pcre库源代码的路径 --without-pcre 禁止Nginx服务器使用pcre库 --with-pcre-opt=<options> 为pcre库的building指定额外的指令 --with-md5=<dir> 指定md5库源代码的路径 --with-md5-opt=<options> 为md5库的building指定额外的指令 --with-md5-asm 使用md5库的汇编源代码 --with-sha1=<dir> 指定sha1库源代码的路径 --with-sha1-opt=<options> 为sha1库的building指定额外的指令 --with-sha1-asm 使用sha1库的汇编源代码 --with-zlib=<dir> 指定zlib库源代码的路径 --with-zlib-opt=<options> 为zlib库的building指定额外的指令 --with-zlib-asm=<cpu> 针对特殊的CPU申明使用汇编源代码 --with-openssl=<dir> 指定OpenSSL库源代码的路径 --with-openssl-opt=<options> 为OpenSSL库的building指定额外的指令