Skip to content

Instantly share code, notes, and snippets.

@lifei6671
Last active April 23, 2020 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lifei6671/63867d7647503dcbb889f786a4224db2 to your computer and use it in GitHub Desktop.
Save lifei6671/63867d7647503dcbb889f786a4224db2 to your computer and use it in GitHub Desktop.
最优编译nginx脚本
./configure --prefix=/opt/websuite/nginx \
--conf-path=/opt/config/nginx/nginx.conf \
--modules-path=/opt/websuite/nginx/modules \
--error-log-path=/opt/logs/nginx/error.log \
--http-log-path=/opt/logs/nginx/access.log \
--pid-path=/opt/run/nginx --user=websuite \
--group=websuite \
--with-file-aio \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_stub_status_module \
--without-http_ssi_module \
--without-http_charset_module \
--without-http_access_module \
--without-http_auth_basic_module \
--without-http_autoindex_module \
--without-http_geo_module \
--without-http_split_clients_module \
--without-http_proxy_module \
--without-http_fastcgi_module \
--without-http_uwsgi_module \
--without-http_scgi_module \
--without-http_memcached_module \
--without-http_empty_gif_module \
--without-http_browser_module \
--without-http_upstream_hash_module \
--without-http_upstream_ip_hash_module \
--without-http_upstream_least_conn_module \
--without-http_upstream_keepalive_module \
--without-http_upstream_zone_module \
--http-client-body-temp-path=/opt/websuite/nginx/temp/client \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
--with-google_perftools_module \
--with-pcre=/tmp/nginx/pcre-8.41 \
--with-pcre-jit \
--with-openssl=/tmp/nginx/openssl-1.0.2j \
--with-openssl-opt="threads shared no-zlib no-comp no-ssl2 no-ssl3 no-ssl3-method"
./configure --user=www \
--group=www \
--prefix=/usr/local/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/run/nginx.pid \
--with-file-aio \
--with-http_stub_status_module \
--add-module=/usr/local/nginx/src/ngx_devel_kit \
--add-module=/usr/local/nginx/src/ngx_cache_purge \
--add-module=/usr/local/nginx/src/nginx-sticky-module \
--with-openssl=/usr/local/nginx/src/openssl \
--with-pcre \
--with-http_v2_module \
--with-stream \
--with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_image_filter_module \
--with-http_gzip_static_module \
--with-http_gunzip_module \
--with-http_sub_module \
--with-http_flv_module \
--with-http_addition_module \
--with-http_realip_module \
--with-http_mp4_module \
--with-ld-opt="-Wl,-E" \
--with-cc-opt="-Wno-error" \
--with-ld-opt="-L /usr/local/lib"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment