Nginx compile and install configure explanation

Nginx compile and install configure explanation

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. Explanation of Nginx compilation parameters:
–prefix=PATH set installation prefix
#Set installation path –sbin-path=PATH set nginx binary pathname #Set binary path
–conf-path=PATH set nginx.conf pathname #Set nginx configuration file path
--Error-log-path=PATH set error log pathname
#Set error log path --pid-path=PATH set nginx.pid pathname #Set nginx.pid path --lock
-path=PATH set nginx.lock pathname #Set nginx.lock Path
--user=USER set non-privileged user for #Set
user processes without special permissions to execute worker processes
--group= GROUP set non-privileged group for #Set user groups without special permissions to execute worker processes --builddir=DIR set build directory # Set the compilation directory
–with-rtsig_module enable rtsig module #Open the rtsig module
–with-select_module enable select module #Open the select module
–without-select_module disable select module #Close the select module
–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 #Turn on the sub module
--with-http_dav_module enable ngx_http_dav_module #Turn on the dav module
--with-http_flv_module enable ngx_http_flv_module #Turn on the flv module
--with-http_mp4_module enable ngx_http_gun_zip_gunx module
enable ngx_httpgun_zip_gunx module #Enable mp4
–With-http_gzip_static_module enable ngx_http_gzip_static_module #Enable gzip_static module
–with-http_auth_request_module enable ngx_http_auth_request_module #Enable auth_request (identity verification request) module
–with-http_random_sec_link_module enable ngx_http_random_index_module
enable ngx_http_random_index_module #enable ngx_http_random_index_module enable ngx_http_random_index_module #secure random_index_module #Enable ngx_http_random_index_module Link) module
–With-http_degradation_module enable ngx_http_degradation_module #Open the degradation module
–with-http_stub_status_module enable ngx_http_stub_status_module #Open the stub_status module
–without-http_charset_http module
disable ngx_http_charset_module
disable ngx_http_charset_module disable ngx_http_charset_module_module disable ngx_http_charset_http_charset_module_module disable ngx_g_charset_http_charset_module disable ngx_g_charset_http_charset_module_disable ngx-http_charset_module_gzip_module – without ngx-g
#Close the ssi module –without-http_userid_module disable ngx_http_userid_module #Close the userid module
–without-http_access_module disable ngx_http_access_module
#Close the access module –without-http_auth_basic_module disable ngx_http_auth_basic_module #Close the auth_basic module (basic authentication
-http_autoindex_autoindex_auto-index without disable ) module – Index) module
-Without-http_geo_module disable ngx_http_geo_module # geo closed module
-without-http_map_module disable ngx_http_map_module # Close map module
-without-http_split_clients_module disable ngx_http_split_clients_module # close split_clients (divided clients) module
-without-http_referer_module disable ngx_http_referer_module # close referer (referrer) module
- without-http_rewrite_module disable ngx_http_rewrite_module #Close rewrite (rewrite) module
–without-http_proxy_module disable ngx_http_proxy_module
#Close proxy (proxy) module –without-http_fastcgi_module disable ngx_http_fastcgi- module #Close fastcgi
module
–without-http_uwsgi_moduleu disable ngx_http_scgi_module #Close the scgi module
–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 #Open the perl module
--with-perl_modules_path=PATH set Perl modules path #Set the path of the perl module
--with-perl=PATH set perl binary pathname #Set the path of the perl command
--http-log-path=PATH set http access log pathname #Set access log path--
http-client-body-temp-path=PATH set path to store http client request body temporary files #Set storage path http client request body temporary files--
http-proxy-temp-path= PATH set path to store http proxy temporary files #Set the storage path http proxy temporary files--
http-fastcgi-temp-path=PATH set path to store http fastcgi temporary files
#Set the fastcgi temporary file storage path-- http-uwsgi-temp-path =PATH set path to store http uwsgi temporary files #Set the uwsgi temporary file storage path --http
-scgi-temp-path=PATH set path to store http scgi temporary files #Set the scgi temporary file storage path
--Without-http disable HTTP server
#Close http server --without-http-cache disable HTTP cache
#Close http cache --with-mail enable POP3/IMAP4/SMTP proxy module
#Open POP3/IMAP4/SMTP protocol module --with-mail_ssl_module enable ngx_mail_ssl_module # open nginx mail ssl module
-without-mail_pop3_module disable ngx_mail_pop3_module # Close POP3 mail module
-without-mail_imap_module disable ngx_mail_imap_module # closed mail imap module
-without-mail_smtp_module disable ngx_mail_smtp_module # closed mail smtp module
-with-google_perftools_module enable ngx_google_perftools_module # open nginx google_perftools (Google Performance Tools) Module
–with-cpp_test_module enable ngx_cpp_test_module #Open cpp_test module
–add-module=PATH enable an external module #Open external (external) module
--With-cc=PATH set C compiler pathname #Set C compiler path
--with-cpp=PATH set C preprocessor pathname #Set C preprocessor pathname
--with-cc-opt=OPTIONS set additional C compiler options #Set additional C compiler options
--with-ld-opt=OPTIONS set additional linker 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 #Establish the specified CPU valid value:
–without-pcre disable PCRE library usage #Close PCRE library usage
–with-pcre force PCRE library usage #Force use the specified PCRE library
–with-pcre=DIR set path to PCRE library sources #Specify pcre use path
--with-pcre-opt=OPTIONS set additional build options for PCRE #Set additional build options for PCRE
--with-pcre-jit build PCRE with JIT compilation support #Build PCRE JIT compiled stand by
--With-md5=DIR set path to md5 library sources #Set path md5 library resources
--with-md5-opt=OPTIONS set additional build options for md5 #Set additional build options for md5
--with-md5-asm use md5 assembler sources #Use md5 assembly source
--with-sha1=DIR set path to sha1 library sources #Set the path of sha1 library
--with-sha1-opt=OPTIONS set additional build options for sha1
#Set additional build options for sha1 --with-sha1- asm use sha1 assembler sources #Use sha1 assembly sources
--with-zlib=DIR set path to zlib library sources #Specify the path of the zlib library
--with-zlib-opt=OPTIONS set additional build options for zlib #Set additional build options for zlib
--With-zlib-asm=CPU use zlib assembler sources optimized
for the specified CPU, valid values:
pentium, pentiumpro #Use zlib assembler sources optimized for the specified CPU
--With-libatomic force libatomic_ops library usage #Force the use of libatomic
--with-libatomic=DIR set path to libatomic_ops library sources #Set libatomic path
--with-openssl=DIR set path to OpenSSL library sources #Set the path of the openssl library
--with-openssl -opt=OPTIONS set additional build options for OpenSSL #Set additional build options for openssl
--with-debug enable debug logging #Open debug log

Guess you like

Origin blog.csdn.net/weixin_44793172/article/details/107169688