Nginx编译安装configure讲解

Nginx在编译安装configure讲解

1、在生成makefile文件时,可以参考如下编译:
./configure --prefix=/usr/local/nginx --conf-path=/etc/nginx/nginx.conf --user=nginx --group=nginx --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx/nginx.pid --lock-path=/var/lock/nginx.lock --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_flv_module --with-http_mp4_module --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --with-debug

2、Nginx的编译参数讲解:
–prefix=PATH set installation prefix #设置安装路径
–sbin-path=PATH set nginx binary pathname #设置binary 路径
–conf-path=PATH set nginx.conf pathname #设置nginx 配置文件路径
–error-log-path=PATH set error log pathname #设置错误日志路径
–pid-path=PATH set nginx.pid pathname #设置nginx.pid 路径
–lock-path=PATH set nginx.lock pathname #设置nginx.lock路径
–user=USER set non-privileged user for #设置没有特殊权限的用户执行worker processes
–group=GROUP set non-privileged group for #设置没有特殊权限的用户组执行worker processes
–builddir=DIR set build directory #设置编译目录
–with-rtsig_module enable rtsig module #开启rtsig 模块
–with-select_module enable select module #开启select 模块
–without-select_module disable select module #关闭 select 模块
–with-poll_module enable poll module #启用 poll 模块
–without-poll_module disable poll module #关闭poll 模块
–with-file-aio enable file AIO support #开启file AIO支持
–with-ipv6 enable IPv6 support #开启IPv6 支持
–with-http_ssl_module enable ngx_http_ssl_module #开启ssl 模块
–with-http_spdy_module enable ngx_http_spdy_module #开启spdy模块
–with-http_realip_module enable ngx_http_realip_module #开启 realip 模块
–with-http_addition_module enable ngx_http_addition_module #开启 addition 模块
–with-http_xslt_module enable ngx_http_xslt_module #开启 xslt模块
–with-http_image_filter_module enable ngx_http_image_filter_module #开启 image_filter模块
–with-http_geoip_module enable ngx_http_geoip_module #开启geoip模块
–with-http_sub_module enable ngx_http_sub_module #开启 sub模块
–with-http_dav_module enable ngx_http_dav_module #开启dav 模块
–with-http_flv_module enable ngx_http_flv_module #开启 flv模块
–with-http_mp4_module enable ngx_http_mp4_module #开启 mp4模块
–with-http_gunzip_module enable ngx_http_gunzip_module #开启gunzip模块
–with-http_gzip_static_module enable ngx_http_gzip_static_module #开启 gzip_static模块
–with-http_auth_request_module enable ngx_http_auth_request_module #开启 auth_request(身份验证请求)模块
–with-http_random_index_module enable ngx_http_random_index_module #开启random_index(随机指数)模块
–with-http_secure_link_module enable ngx_http_secure_link_module #开启 secure_link(安全链接)模块
–with-http_degradation_module enable ngx_http_degradation_module #开启degradation 模块
–with-http_stub_status_module enable ngx_http_stub_status_module #开启 stub_status 模块
–without-http_charset_module disable ngx_http_charset_module #关闭 charset(字符集) 模块
–without-http_gzip_module disable ngx_http_gzip_module #关闭 gzip模块
–without-http_ssi_module disable ngx_http_ssi_module #关闭 ssi 模块
–without-http_userid_module disable ngx_http_userid_module #关闭 userid模块
–without-http_access_module disable ngx_http_access_module #关闭 access模块
–without-http_auth_basic_module disable ngx_http_auth_basic_module #关闭 auth_basic (基本身份认证)模块
–without-http_autoindex_module disable ngx_http_autoindex_module #关闭 autoindex(自动变址)模块
–without-http_geo_module disable ngx_http_geo_module #关闭 geo模块
–without-http_map_module disable ngx_http_map_module #关闭 map 模块
–without-http_split_clients_module disable ngx_http_split_clients_module #关闭 split_clients (划分客户端)模块
–without-http_referer_module disable ngx_http_referer_module #关闭 referer (推荐人)模块
–without-http_rewrite_module disable ngx_http_rewrite_module #关闭 rewrite (重写)模块
–without-http_proxy_module disable ngx_http_proxy_module #关闭 proxy (代理)模块
–without-http_fastcgi_module disable ngx_http_fastcgi_module #关闭 fastcgi模块
–without-http_uwsgi_module disable ngx_http_uwsgi_module #关闭 uwsgi 模块
–without-http_scgi_module disable ngx_http_scgi_module #关闭 scgi 模块
–without-http_memcached_module disable ngx_http_memcached_module #关闭 memcached 模块
–without-http_limit_conn_module disable ngx_http_limit_conn_module # 关闭 limit_conn 模块
–without-http_limit_req_module disable ngx_http_limit_req_module #关闭 limit_req模块
–without-http_empty_gif_module disable ngx_http_empty_gif_module #关闭 empty_gif 模块
–without-http_browser_module disable ngx_http_browser_module #关闭 browser 模块
–without-http_upstream_ip_hash_module disable ngx_http_upstream_ip_hash_module #关闭 ip_hash模块
–without-http_upstream_least_conn_module disable ngx_http_upstream_least_conn_module #关闭 least_conn 模块
–without-http_upstream_keepalive_module disable ngx_http_upstream_keepalive_module #关闭 keepalive 模块
–with-http_perl_module enable ngx_http_perl_module #开启perl 模块
–with-perl_modules_path=PATH set Perl modules path #设置perl模块路径
–with-perl=PATH set perl binary pathname #设置perl 命令路径
–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客户端请求主体临时文件
–http-proxy-temp-path=PATH set path to store http proxy temporary files #设置存储路径 http代理临时文件
–http-fastcgi-temp-path=PATH set path to store http fastcgi temporary files #设置 fastcgi临时文件存储路径
–http-uwsgi-temp-path=PATH set path to store http uwsgi temporary files #设置 uwsgi 临时文件存储路径
–http-scgi-temp-path=PATH set path to store http scgi temporary files #设置 scgi 临时文件存储路径
–without-http disable HTTP server #关闭 http server
–without-http-cache disable HTTP cache #关闭 http cache
–with-mail enable POP3/IMAP4/SMTP proxy module #开启 POP3/IMAP4/SMTP 协议模块
–with-mail_ssl_module enable ngx_mail_ssl_module #开启 nginx mail ssl 模块
–without-mail_pop3_module disable ngx_mail_pop3_module #关闭 mail pop3模块
–without-mail_imap_module disable ngx_mail_imap_module #关闭 mail imap 模块
–without-mail_smtp_module disable ngx_mail_smtp_module #关闭 mail smtp 模块
–with-google_perftools_module enable ngx_google_perftools_module #开启 nginx google_perftools (谷歌性能工具)模块
–with-cpp_test_module enable ngx_cpp_test_module #开启 cpp_test 模块
–add-module=PATH enable an external module #开启external(外部)模块
–with-cc=PATH set C compiler pathname #设置C 编译器 路径
–with-cpp=PATH set C preprocessor pathname #设置 C预编译器 路径
–with-cc-opt=OPTIONS set additional C compiler options #设置额外的C编译器选项
–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 #建立指定的CPU 有效值:
–without-pcre disable PCRE library usage #关闭 PCRE 库 使用
–with-pcre force PCRE library usage #强制使用指定的PCRE 库
–with-pcre=DIR set path to PCRE library sources #指定 pcre 使用路径
–with-pcre-opt=OPTIONS set additional build options for PCRE #为PCRE设置额外的构建选项
–with-pcre-jit build PCRE with JIT compilation support #构建PCRE JIT编译的支持
–with-md5=DIR set path to md5 library sources #设置路径md5库资源
–with-md5-opt=OPTIONS set additional build options for md5 #为md5设置额外的构建选项
–with-md5-asm use md5 assembler sources #使用md5汇编源
–with-sha1=DIR set path to sha1 library sources #设置 sha1 库的路径
–with-sha1-opt=OPTIONS set additional build options for sha1 #为sha1设置额外的构建选项
–with-sha1-asm use sha1 assembler sources #使用sha1汇编源
–with-zlib=DIR set path to zlib library sources #指定 zlib 库的路径
–with-zlib-opt=OPTIONS set additional build options for zlib #为zlib 设置额外的构建选项
–with-zlib-asm=CPU use zlib assembler sources optimized
for the specified CPU, valid values:
pentium, pentiumpro #使用 zlib汇编优化的来源
–with-libatomic force libatomic_ops library usage #强制 使用libatomic
–with-libatomic=DIR set path to libatomic_ops library sources #设置 libatomic 路径
–with-openssl=DIR set path to OpenSSL library sources #设置 openssl 库的路径
–with-openssl-opt=OPTIONS set additional build options for OpenSSL #为 openssl 设置额外的构建选项
–with-debug enable debug logging #开启debug 日志

猜你喜欢

转载自blog.csdn.net/weixin_44793172/article/details/107169688