下载需要组件
) ^/ Z2 R9 K s5 M/ y& Hwget http://nginx.org/download/nginx-1.17.7.tar.gz$ Y6 l+ V! w( @7 j* V* `
tar xvzf nginx-1.17.7.tar.gz ^! |/ I* f& z+ \ ^0 F* o w
1 s) A+ D& ^$ _# O0 s
wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
s3 g3 g0 Z' c# ]) x7 h- ktar xvzf openssl-1.1.1d.tar.gz
/ ]8 N. j; k% Y, A1 j: R$ g8 n* b& d2 ^
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz. O6 m6 ]& J5 e
tar xvzf pcre-8.43.tar.gz) \, _3 j$ I% e9 R
* H- c4 k: Y+ I; Y' a1 _7 I
wget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip
' z5 m! s0 U, n- b, }unzip ngx_http_substitutions_filter.zip
" J0 |7 [ M- n4 `# `5 y
" M. f$ c$ r! q* d- H1 Ocd nginx-1.17.78 U7 }1 \/ @! i0 U" s5 ~
. X$ o' s" s6 ~4 W6 c0 i9 n3 F8 w* L2 B) m0 q L; Y& H, ^, A( K- M
配置文件
1 Y% {) h- Q; J# @$ p! ][Shell] 纯文本查看 复制代码 ./configure \
--user=www \
--group=www \
--prefix=/www/webserver/nginx-1.17.7 \
--sbin-path=/www/webserver/nginx-1.17.7/sbin/nginx \
--pid-path=/www/webserver/nginx-1.17.7/logs/nginx.pid \
--conf-path=/www/webserver/nginx-1.17.7/conf/nginx.conf \
--error-log-path=/www/webserver/nginx-1.17.7/logs/error.log \
--http-log-path=/www/webserver/nginx-1.17.7/logs/access.log \
--http-client-body-temp-path=/www/webserver/nginx-1.17.7/temp/client \
--http-proxy-temp-path=/www/webserver/nginx-1.17.7/temp/proxy \
--http-fastcgi-temp-path=/www/webserver/nginx-1.17.7/temp/fcgi \
--http-scgi-temp-path=/www/webserver/nginx-1.17.7/temp/scgi \
--http-uwsgi-temp-path=/www/webserver/nginx-1.17.7/temp/uwsgi \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_realip_module \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_gzip_static_module \
--with-pcre=/root/pcre-8.43 \
--with-http_sub_module \
--with-http_geoip_module \
--add-module=/root/ngx_http_substitutions_filter_module-master \
--with-openssl=/root/openssl-1.1.1d 9 D4 h5 ^/ P* n2 I" h
编译 make
! J. g* L" P- g安装 make install
+ r3 o W% b+ p* j, K0 d F |