美文网首页
nginx 动态添加模块

nginx 动态添加模块

作者: 逆行的小电驴 | 来源:发表于2018-03-27 17:12 被阅读0次
  • 需要用到nginx的tcp模块,以前安装的nginx没有这个模块。
./nginx -V 可以看到所有包含的模块(我这边实际上已经安装了stream模块)
  • 重新编译nginx找到上图中的 configure arguments + --with-stream


    ./configure --with-http_ssl_module --with-http_v2_module --with-stream
  • make一下,不要make install 会覆盖安装


    make
  • 备份老的可执行文件,替换新的可执行文件


    cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
    cp ./objs/nginx /usr/local/nginx/sbin/
  • 启动nginx


    ./nginx

相关文章

网友评论

      本文标题:nginx 动态添加模块

      本文链接:https://www.haomeiwen.com/subject/hajscftx.html