nginx的監控配置

最近在弄性能,在性能過程當中須要監控nginx的一些配置,這裏簡單的搭建了環境linux

 

//下載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;
}
相關文章
相關標籤/搜索