下载需要组件2 h4 ?; b& e6 A" M
wget http://nginx.org/download/nginx-1.17.7.tar.gz; p6 q' t, F9 ]( m9 a& }( |
tar xvzf nginx-1.17.7.tar.gz& ~! h X1 X) \4 D# b. [' d
1 ^6 s8 Z+ R8 r+ N& Hwget https://www.openssl.org/source/openssl-1.1.1d.tar.gz" H6 I1 W* q/ t
tar xvzf openssl-1.1.1d.tar.gz4 y: c* i+ p! ]9 W7 B
+ I1 h, G4 M! [( L; L, \5 D
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz. H/ s' v$ ]1 p4 q9 Q. _
tar xvzf pcre-8.43.tar.gz
% _! I; h# m0 r5 O3 F+ z
* y& H/ Z! _3 n& F Swget https://github.com/yaoweibin/ngx ... /archive/master.zip -O ngx_http_substitutions_filter.zip* Z3 g' ?$ u5 z
unzip ngx_http_substitutions_filter.zip- `: i( t. u( T" E; X# U0 `
5 q+ q. ~$ J# o; C& U7 D
cd nginx-1.17.7- w7 P }6 s M% @% E+ K8 l& l* l
|4 C2 M& R) Z! `9 W* C V1 b- a1 A" u' J. v: P
配置文件
7 Q2 U } Z3 R0 U0 [% }[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 ' K4 V1 \) [" e* j) s3 t
编译 make! a" {5 y" v, z) X' P6 H& K7 F
安装 make install
: a* k% h; j$ A! \5 d; l3 K |