nginx第三方模块安装方法(转)

1. nginx第三方模块安装方法

./configure --prefix=/你的安装目录  --add-module=/第三方模块目录

2. 在nginx安装目录中创建文件夹third_moule。
下载echo模块到nginx安装目录中的third_moule。

wget https://github.com/openresty/echo-nginx-module/archive/v0.61.tar.gz

3. 解压

sudo tar -zxvf v0.61.tar.gz

4. 编译

sudo ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 --with-http_sub_module --with-openssl=/usr/local/lnmp1.4-full/src/openssl-1.0.2l --with-http_image_filter_module --add-module=/usr/local/lnmp1.4-full/src/nginx-1.12.2/third_module/echo-nginx-module-0.61

5. 安装

sudo make

 

6. 替换二级制文件

sudo cp -f ./objs/nginx /usr/local/nginx/sbin/nginx

参考:nginx第三方模块安装方法 - TBHacker - 博客园 (cnblogs.com)

 

posted @ 2021-12-21 10:43  littlevigra  阅读(726)  评论(0编辑  收藏  举报