11-1、Nginx安装第三方统计模块http_stub_status_module,观察Nginx状态

24 篇文章 0 订阅

 

 

进入到之前nginx编译包的根目录

➜  nginx-1.16.1 make clean          
rm -rf Makefile objs
➜  nginx-1.16.1 ./configure --help|grep status
  --with-http_stub_status_module     enable ngx_http_stub_status_module
➜  nginx-1.16.1 /usr/local/nginx/sbin/nginx -V                           
nginx version: nginx/1.16.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) 
configure arguments: --prefix=/usr/local/nginx --add-module=/usr/local/nginx/modules/ngx_http_consistent_hash


得到 命令

./configure --prefix=/usr/local/nginx --add-module=/usr/local/nginx/modules/ngx_http_consistent_hash --with-http_stub_status_module

make  


mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak


cp objs/nginx /usr/local/nginx/sbin

➜  nginx-1.16.1 ps aux | grep nginx
root      27309  0.0  0.0  25052    28 ?        S    10:35   0:00 nginx: master process ./sbin/nginx
nobody    55353  0.0  0.0  27372     0 ?        S    17:54   0:00 nginx: worker process
nobody    55354  0.0  0.0  27372     8 ?        S    17:54   0:00 nginx: worker process

kill -USR2 27309

kill -WINCH 27309

kill -QUIT 27309

可以参考 <<10-1、源码安装的nginx平滑升级及重新编译添加模块>>


使用

vim  nginx.conf

加入一个location

        location /status {
                stub_status on;
                access_log off;
                allow 192.168.1.52;
                allow 192.168.1.10;
                deny all;
        }






 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值