查看模块
1 2 3 4 5 6
| cd nginx-1.14.2 cat auto/options | grep YES
./nginx -V
|
添加模块
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| cd nginx-1.14.2
./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_realip_module
make
cp /opt/nginx/sbin/nginx /mnt
cp objs/nginx /opt/nginx/sbin/
/opt/nginx/sbin/nginx -V
|
添加第三方模块 (nginx_upstream_check_module-master)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| wget https://codeload.github.com/yaoweibin/nginx_upstream_check_module/zip/master tar xf nginx_upstream_check_module-master.zip
cd nginx-1.14.2
patch -p1 < ../nginx_upstream_check_module-master/check_1.14.0+.patch
./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_realip_module --add-module=../nginx_upstream_check_module-master/
make
cp /opt/nginx/sbin/nginx /mnt
cp objs/nginx /opt/nginx/sbin/
/opt/nginx/sbin/nginx -V
|