nginx添加模块

[root@VM_0_3_centos nginx]# ./sbin/nginx -V
nginx version: nginx/1.12.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) 
configure arguments: --prefix=/app/nginx-1.12.2
#-V参数查看版本和编译参数
#已运行的nginx没有模块,现在要添加模块

  

 ./configure  --prefix=/app/nginx-1.12.2  --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module
make
cp nginx nginx.bak
cp /data/nginx-1.12.2/objs/nginx ./sbin/nginx
#这是只添加自带模块
#带参数重新编译
#然后make,生产执行文件,但不要make install
#备份原nginx执行文件
#把新生成的nginx文件复制过去

  

[root@VM_0_3_centos nginx]# ./sbin/nginx -V
nginx version: nginx/1.12.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) 
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/app/nginx-1.12.2 --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module
#现在查看已经改变

  

  

posted @ 2018-08-09 11:41  jabbok  阅读(183)  评论(0编辑  收藏  举报