话不多说,我的系统的centos6,参考帖子https://bbs.swdyz.com/forum.php?mod=viewthread&tid=418: E* v8 d! _9 f: Q
下载需要组件! h: B5 h7 R3 K8 Y6 D/ _9 A+ |
wget http://nginx.org/download/nginx-1.15.9.tar.gz
9 T+ |& L3 w0 j7 b j! A. utar xvzf nginx-1.15.9.tar.gz
0 p3 Y, n' U/ @( N; A% }3 ^1 I& C9 r) L4 O, y$ [+ t
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz% u& p2 M& q3 h# h' p
tar xvzf openssl-1.1.1b.tar.gz
3 W$ X- v, i2 R, k) r* C
8 i4 x! a3 T5 d$ O5 ^3 owget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz9 Y, V- i2 N, G0 a
tar xvzf pcre-8.43.tar.gz8 I) G, z' c; f; ^' m, `
1 f, c" u' T6 g: Z6 \6 Ewget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip
, Q# u& \! c. P5 h5 n2 Tunzip ngx_http_substitutions_filter.zip# q' ~1 T/ M$ h$ r7 M7 H9 ?
" w0 R" C/ l8 j' Gcd nginx-1.15.99 ]9 z" ?/ ?+ T! j& v) \' q
& C' ^7 A7 m2 U. o6 x+ D配置文件* M5 t2 W1 T' X: O, }, t1 ~6 ^
" u( j) u" U: d; j. g# ^+ s. o
) A9 R- d2 K* X; `( M% N[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
. F1 n5 F" |# s+ {* b: ~6 F8 m9 A' D# Q* R编译 make% A% o9 ?- j2 E) Y
安装 make install: o4 ^. \8 n c* e2 W
. L3 h1 v* I. L) P* C$ B/ D
其它的启动配置文件找度娘。
7 }7 U! M3 Q$ o3 k& ]: ?; _ |