nginx的监控配置

最近在弄性能,在性能过程中需要监控nginx的一些配置,这里简单的搭建了环境

//下载nginx  根据自己的版本
wget http://nginx.org/download/nginx-1.6.0.tar.gz

tar zxvf nginx-1.6.0.tar.gz

//yum install pcre*  (http_rewrite)
//yum install zlib* (gzip 压缩库)
yum install gcc yum install gcc-c++
 yum install pcre* zlib* gcc gcc-c++
 
./configure --prefix=/usr/local/nginx   

./configure  --prefix=/usr/local/nginx --add-module=/app/nginx-rtmp-module-master/ --with-http_flv_module --with-http_mp4_module
//编译,当编译没错时就安装,到程序源文件后执行
make && make install
 
# /usr/local/nginx/sbin/nginx -s reload
 
# /www/wdlinux/nginx/sbin/nginx -s stop
 
//-aux 显示所有包含其他使用者的行程 
ps -A //显示所有进程
ps aux|grep nginx
 
 
 
./configure --prefix=/usr/local/nginx --with-http_stub_status_module
 
location /nginx_status {
    # Turn on nginx stats
    stub_status on;
    # I do not need logs for stats
    access_log   off;
    # Security: Only allow access from 192.168.1.100 IP #
    #allow 192.168.1.100;
    # Send rest of the world to /dev/null #
    #deny all;
}
原文地址:https://www.cnblogs.com/Mushishi_xu/p/4304875.html