话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=418
: R7 l8 C0 O$ p# A/ h. k, ?) \下载需要组件( h; D9 h9 c$ z' A. a1 W
wget http://nginx.org/download/nginx-1.15.9.tar.gz
! D0 o& I) |" ]' m) P4 |4 @0 ?tar xvzf nginx-1.15.9.tar.gz
& H: S5 U, M A0 {8 S* ~, f! T4 b6 U
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
8 J! k) B4 U. h: f; s4 Jtar xvzf openssl-1.1.1b.tar.gz
M6 R" H# [5 r1 R3 R) N5 L& r+ i9 g% b' B9 O) b
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz; S9 \0 v% q- ~
tar xvzf pcre-8.43.tar.gz. j2 Y9 K0 N' a3 `2 ]2 O
, E- b* x% D" z5 jwget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip
* Z' {! P: N! j7 T, T# Wunzip ngx_http_substitutions_filter.zip& A6 H! W! K; W7 v, U9 A w
3 g. d: h# I; l+ v5 Scd nginx-1.15.9; G1 h4 U' B" I- {; u# q
2 h1 c7 R' _% E配置文件
8 u) h' _* S3 K( s( C. Q: u5 `+ P+ d9 O/ r# H( s
j& U" E ]) M9 B, S[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 , u n& `" y$ Y4 c. B& y; u0 b
编译 make- ~9 w1 B% S/ x# [7 w& a$ |
安装 make install
! _6 \' }- a# @" E9 b T3 t+ m& Q; T6 |" Y
其它的启动配置文件找度娘。
( A) Q( E. d: d6 Z& I `& a |