话不多说,我的系统的centos6,参考帖子https://bbs.swdyz.com/forum.php?mod=viewthread&tid=4183 x, X8 u! h8 N6 w2 R6 D- b
下载需要组件
4 M8 ]* p0 B6 {wget http://nginx.org/download/nginx-1.15.9.tar.gz
7 z+ P) a* I1 Z0 _9 `" Itar xvzf nginx-1.15.9.tar.gz
v5 H$ \: L7 b/ i g! w2 c+ U0 B+ t, D
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz: T+ ]5 G; k2 f! L
tar xvzf openssl-1.1.1b.tar.gz
3 e [6 _; x6 M( j' B! _% N, ^/ \1 ~. }5 C* H
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz7 @+ w9 N$ U! N3 t5 I4 A
tar xvzf pcre-8.43.tar.gz
i8 H* f* W' }. U/ }" n1 X; \9 M2 F& Y* G0 j1 L
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip
1 q* [+ N9 n- m2 y) E) T$ N& i1 wunzip ngx_http_substitutions_filter.zip0 ~! g1 n* Q5 L7 [
' T* }, M3 C% ]- _
cd nginx-1.15.9
/ J J8 [; X! W# d) l
1 O! f& b, G/ U- v配置文件: b S7 t3 i& r$ d5 L
# `' {$ o3 A0 a
- N. |6 G3 W: v+ t; } c* {) 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
K' p$ g4 ]; d/ O& ^$ h编译 make
/ {( ?/ f0 O& O1 J9 D; Y! h安装 make install; B7 Q/ b. \( a
! Q4 n+ [. ?1 f7 c x& y7 @& W1 k其它的启动配置文件找度娘。8 b$ S7 t% P i
|