nginx编译添加新的模块

本文介绍了如何在已安装的nginx中添加第三方模块ngx_http_google_filter_module。首先下载nginx源码并配置,然后编译并安装。接着下载模块源码,通过重新配置并执行make命令来添加模块,最后更新nginx配置并启动服务。
摘要由CSDN通过智能技术生成

1、已经安装好的nginx,需要添加一个未被编译安装的模块,以安装第三方ngx_http-google_filter_module模块为例
#cd /tmp/
#pkill nginx
#wget https://nginx.org/download/nginx-1.16.0.tar.gz
#tar xfz nginx-1.16.0.tar.gz
#cd nginx-1.16.0/
#./configure --prefix=/usr/local/nginx --with-http_gzip_static_module && make && make install

2、 下载第三方扩展模块
#cd /tmp/
#git clone https://github.com/cuber/ngx_http_google_filter_module #先安装git

3、查看nginx编译安装以安装模块
#cd /tmp/
#git clone https://github.com/cuber/ngx_http_google_filter_module #先安装git
15.2、查看nginx编译安装以安装模块
#cd /usr/local/nginx/sbin/
#./nginx -v //查看版本
#./nginx -V //查看以安装模块
加入需要安装的模块,重新编译,如这里添加-add-module=/data/software/ngx http_google_filter_module
#cd /tmp/nginx-1.16.0/
#./configure --prefix=/usr/local/nginx \

–error-log-path=/var/log/nginx/nginx_error.log
–http-log-path=/var/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值