话不多说,我的系统的centos6,参考帖子https://bbs.swdyz.com/forum.php?mod=viewthread&tid=4184 w/ t- `. J$ z, R; }
下载需要组件, X+ O) r4 F$ k& r3 a
wget http://nginx.org/download/nginx-1.15.9.tar.gz
! H& a T9 G& m9 ?- o( P# A/ ktar xvzf nginx-1.15.9.tar.gz
& D8 r1 M; |% D/ \1 j9 T1 [/ w$ H$ Q% |+ r2 E* y0 \. v6 U8 R. h
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
* ?- B- K H% @2 ?tar xvzf openssl-1.1.1b.tar.gz0 U! D0 r6 k9 D% E8 r5 P
0 Q) I0 g, ]+ p/ U
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz" P! q' G3 R4 h1 o+ ^
tar xvzf pcre-8.43.tar.gz
# S% _. Z, Q# c, S8 N- T: l; |; [$ H0 s$ m, C6 l
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip
- m6 ~) S; F) b: ~unzip ngx_http_substitutions_filter.zip
8 p5 I; |4 V2 D) g3 n9 t& c9 t4 P* ~
5 N' \& b% V# S) [cd nginx-1.15.9
r* C* E: L+ G8 I. E( s
; ?( W4 e5 F4 i6 J5 A$ L7 F. x配置文件8 E( U. U9 p2 Z' k0 O. ]
& G0 d9 Z8 l" [8 C* @) q
: `7 w9 h2 Z3 Y* T3 W8 }
[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
v- i# w8 `0 w4 f编译 make
1 T6 a, k0 [; o" c9 ]. f安装 make install
\2 W5 J z+ `) R8 q/ c+ p6 T* Z- M L' I4 U
其它的启动配置文件找度娘。* L# z+ y6 j1 P6 h. Z
|