话不多说,我的系统的centos6,参考帖子https://bbs.swdyz.com/forum.php?mod=viewthread&tid=4185 d+ q; ?: `. I- l- Q
下载需要组件9 M- Z0 d6 w0 y; n
wget http://nginx.org/download/nginx-1.15.9.tar.gz
2 E# r7 U1 v* n/ M% Gtar xvzf nginx-1.15.9.tar.gz3 @* I8 ^- f- X# _1 i
+ u, v! H/ u) x9 Owget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
! b# S8 k1 K; V9 c# V, ]tar xvzf openssl-1.1.1b.tar.gz
# Y9 @9 n( O3 |5 t8 d5 m% r
/ R& f" f$ d" W1 gwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
' S3 T7 w0 g6 p* ]- ]$ z) g& ~tar xvzf pcre-8.43.tar.gz
$ j+ S' C( X" Z5 h
% ?8 X; |- @/ {( l( }# g- T9 B. [wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip) {8 L2 P, e3 ?0 i
unzip ngx_http_substitutions_filter.zip/ z9 z+ l1 A' q( q
$ d) Q# s- s0 S. E7 Jcd nginx-1.15.9
0 p. I( z* d1 S" e3 @! w+ x0 B9 N( E% u8 [5 z; u; g
配置文件5 E) ~: K3 e5 o: Q2 k
" a: ^: X5 b, D" E7 _5 C5 b c; x i' X9 a! e( H+ V1 k* a/ i
[Shell] 纯文本查看 复制代码 ./configure \
--user=www \
--group=www \
--prefix=/www/webserver/nginx-1.15.9 \
--sbin-path=/www/webserver/nginx-1.15.9/sbin/nginx \
--pid-path=/www/webserver/nginx-1.15.9/logs/nginx.pid \
--conf-path=/www/webserver/nginx-1.15.9/conf/nginx.conf \
--error-log-path=/www/webserver/nginx-1.15.9/logs/error.log \
--http-log-path=/www/webserver/nginx-1.15.9/logs/access.log \
--http-client-body-temp-path=/www/webserver/nginx-1.15.9/temp/client \
--http-proxy-temp-path=/www/webserver/nginx-1.15.9/temp/proxy \
--http-fastcgi-temp-path=/www/webserver/nginx-1.15.9/temp/fcgi \
--http-scgi-temp-path=/www/webserver/nginx-1.15.9/temp/scgi \
--http-uwsgi-temp-path=/www/webserver/nginx-1.15.9/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 \
--add-module=/root/ngx_http_substitutions_filter_module-master \
--with-openssl=/root/openssl-1.1.1b ) |. c6 P; U h; Y
编译 make
; n9 u9 k7 f+ D. S安装 make install& \+ o* O0 G' z1 S
/ J) g& b5 Z) v3 U* T
其它的启动配置文件找度娘。* Y, L3 H2 B$ u! ~
|