欢迎来到天天文库
浏览记录
ID:33051853
大小:242.99 KB
页数:4页
时间:2019-02-19
《centos63下配置nginx状态页面》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、CentOS6源码编译安装Nginx1.安装编译时需要用到的相关组件#yuminstallglib2-developenssi-develpcre-develbzip2-develgzip-devel2.安装NGINX#cd/usr/local/src#wgethttp://nginx•org/download/nginx-1•0.4.tar.gz#tar-zxvfnginx-1.0.4.tar.gz#cdnginx-1.0.4#•/configure--with-http_stub_status_module
2、#make#makeinstall3・查看NGINX相关文件及配置文档的位置root@localhost:/usr/local/nginx/sbinFileEditViewSearchTerminalHelp[root@local.hostnginx-1.0.4]#
3、find/〔namenginx]/usr/local/src/nginx-1•6•4/ob]s/nginx/usr/local/nqinx
4、5、[roor^iocainosrnginx-l~0746、j#cdusr/local/nginx4・启动NGINX(如上图的红线路径所示)FileEditViewSearchTerminalHelp/usr/local/nginx/sbin/nginx[root@localhost*]#cd/usr/local/nginx/sbin[root@localhostsbin]#Isnginx[root@loelhost找到NGTNX启动程序所在的文件夹,启动•/nginx表示执行程序5.打开浏览器输入(http://IP),看到如下界面表示NGINX开启成功鼻%Appli7、cationsPlacesSystem、申6.查看NGINX配置文件7.在配置文档中添加状态监控代码location/nginx-status{stub_statuson;access_logoff;}8•保存后f再次启动NGINX(方法同开启)[root@localhost-]#cd[root@localhostsbin]#[root@localhostsbin]#[root@localhostsbin]#/usr/local/nginx/sbinIs./nginx9.浏第器查看状态页面http://IP/n8、gix-statushttp://IP:8000/ngix-status■队ApplicationsPlacesSystemMozillaFirefox9、EileEdityiewHistoryBookmarksB>olsHelp10、:;jhttp:/n92.168.2...00/nginx-status令■11、匚〕[192.168.230.1303QOO/nginx・stau7Activeconnections:1serveracceptshandledrequests3364Reading:0Writing:1W12、aiting:0看到这个页面表示NGINX的状态页面监控成功啦!吴磊
5、[roor^iocainosrnginx-l~074
6、j#cdusr/local/nginx4・启动NGINX(如上图的红线路径所示)FileEditViewSearchTerminalHelp/usr/local/nginx/sbin/nginx[root@localhost*]#cd/usr/local/nginx/sbin[root@localhostsbin]#Isnginx[root@loelhost找到NGTNX启动程序所在的文件夹,启动•/nginx表示执行程序5.打开浏览器输入(http://IP),看到如下界面表示NGINX开启成功鼻%Appli
7、cationsPlacesSystem、申6.查看NGINX配置文件7.在配置文档中添加状态监控代码location/nginx-status{stub_statuson;access_logoff;}8•保存后f再次启动NGINX(方法同开启)[root@localhost-]#cd[root@localhostsbin]#[root@localhostsbin]#[root@localhostsbin]#/usr/local/nginx/sbinIs./nginx9.浏第器查看状态页面http://IP/n
8、gix-statushttp://IP:8000/ngix-status■队ApplicationsPlacesSystemMozillaFirefox
9、EileEdityiewHistoryBookmarksB>olsHelp
10、:;jhttp:/n92.168.2...00/nginx-status令■
11、匚〕[192.168.230.1303QOO/nginx・stau7Activeconnections:1serveracceptshandledrequests3364Reading:0Writing:1W
12、aiting:0看到这个页面表示NGINX的状态页面监控成功啦!吴磊
此文档下载收益归作者所有