话不多说,我的系统的centos6,参考帖子http://bbs.swdyz.com/forum.php?mod=viewthread&tid=4186 G! C' a3 ~9 @/ y) c% ?
下载需要组件
" a, @% E! K5 pwget http://nginx.org/download/nginx-1.15.9.tar.gz
' _+ C, q, n5 M$ |% T( \tar xvzf nginx-1.15.9.tar.gz
6 B) _ S/ F0 c6 B" W. Z5 d# K# w4 C/ W9 i) G# [
wget https://www.openssl.org/source/openssl-1.1.1b.tar.gz
3 A/ \+ @. U+ m$ `! k; T: ctar xvzf openssl-1.1.1b.tar.gz
& \" ~! I0 U. K
# l9 t( K9 b5 awget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz
* U0 y2 F! g' R) O- t( ]1 T6 Vtar xvzf pcre-8.43.tar.gz' Z/ V4 Q1 L4 |8 P4 S7 s5 n
7 W% Y0 w# I/ ?) S3 |7 Z
wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.zip -O ngx_http_substitutions_filter.zip$ d+ j3 v; l% X1 t4 A
unzip ngx_http_substitutions_filter.zip, {" I/ \" N+ Q) ]" q
" Q7 v) ?: K l k# a
cd nginx-1.15.9( ?+ y( U) B4 D \" `- m, W
8 ^7 c# F1 e. T- _
配置文件
5 V3 I8 l" q0 | g
0 Y, w0 R" O6 x4 ~! P6 a8 Y1 V& W& ]0 `
[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 4 ^+ s* r5 S5 i$ ^, p- X
编译 make& z( b: w6 y# R$ V' U
安装 make install# L6 V$ ?' `$ k; H7 z1 f; T
& D" O! h* N9 u( H8 k% H5 u
其它的启动配置文件找度娘。
" h, y' U& I* A4 E: H |