网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Nagios监控平台快速安装

Nagios是一款开源的免费网络监视工具,能有效监控Windows、Linux和Unix的主机状态,交换机路由器等网络设置,打印机等。
 
一、首先安装apache:
  1. 安装apache,采用yum方式安装,安装的命令是yum install –y httpd  
  2. 安装完apache后,启动apache命令/etc/init.d/httpd restart 即可! 
 
二、安装php:
  1. Nagios是基于php语音编写的程序,所以需要安装php,也采用yum方式安装  
  2. Yum install php php-devel -y即可 
  
三、下载nagios:
  1. 现在nagios版本和客户端插件地址如下:  
  2. wget http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.2.1/nagios-3.2.1.tar.gz/download  
  3. wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz/download   
  4. wget  http://jaist.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.13/nrpe-2.13.tar.gz   
  5.    
  6. 创建用户维护Nagios的用户和组  
  7. useradd nagios  
  8. passwd nagios 
四、在服务器端,安装Nagios和nrpe、nagios插件:
  1. 安装Nagios  
  2. tar zxvf nagios-3.2.1.tar.gz  
  3. cd nagios-3.2.1  
  4. ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios  
  5. make all  
  6. make install                   //来安装主程序,CGI和HTML文件  
  7. make install-init              //在/etc/rc.d/init.d安装启动脚本  
  8. make install-config            //来安装示例配置文件,安装的路径是/usr/local/nagios/etc  
  9. make install-commandmode//来配置目录权限   
  10. make install-webconf     写入配置文件  
  11.    
  12. 安装Nagios-plugins  
  13. tar zxvf nagios-plugins-1.4.15.tar.gz  
  14. cd nagios-plugins-1.4.15  
  15. ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios  
  16. make && make install  
  17. 安装nrpe   
  18. tar -xzf nrpe-2.13.tar.gz && cd nrpe-2.13 &&./configure --enable-ssl --with-ssl-lib &&make all && make install-plugin && make install-daemon && make install-daemon-config  
  19. chown  -R nagios:nagios /usr/local/nagios/   
  20.  
  21. /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d  启动nrpe服务 
 
五、创建web 访问用户:
  1. 增加访问控制验证用户:(第一次创建时要加参数c)  
  2. htpasswd -c /usr/local/nagios/etc/htpasswd.users  nagiosadmin  
  3.  
  4. nagios安装完毕,然后重启apache,重启nagios,/etc/init.d/nagios restart  
  5. 访问:http://localhost/nagios/ 即可! 即可访问到nagios最初安装界面 
 
六、在客户端安装nrpe、nagios-plugin:
  1. 首先下载nagios-plugins-1.4.15.tar.gz和nrpe-2.13.tar.gz,  
  2.    
  3. 执行如下脚本即可:  
  4. #!/bin/sh  
  5. ###auto make install nagios_plugin and nrpe  
  6. useradd nagios  
  7. tar -xzf nagios-plugins-1.4.15.tar.gz &&cd nagios-plugins-1.4.15 &&./configure --prefix=/usr/local/nagios &&make &&make install  
  8.    
  9. sleep 2  
  10.    
  11. echo "This is make install nrpe ,please waiting .................."  
  12. cd ../ ; tar -xzf nrpe-2.13.tar.gz && cd nrpe-2.13 &&./configure --enable-ssl --with-ssl-lib &&make all && make install-plugin && make install-daemon && make install-daemon-config  
  13.    
  14. chown  -R nagios:nagios /usr/local/nagios/  
  15. cd .. ;cp nrpe.cfg /usr/local/nagios/etc/nrpe.cfg  
  16.    
  17. /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d  
  18.    
  19. ###Add auto start  
  20. grep "nrpe" /etc/rc.local  
  21.    
  22. if [ $? -ne 0 ];then  
  23. echo "/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d" >>/etc/rc.local  
  24. else  
  25. echo "nrpe is exist"  
  26. fi  
  27. 保存即可! 

 

武穴网站建设公司成都创新互联,武穴网站设计制作,有大型网站制作公司丰富经验。已为武穴近千家提供企业网站建设服务。企业网站搭建\外贸营销网站建设要多少钱,请找那个售后服务好的武穴做网站的公司定做!


网站题目:Nagios监控平台快速安装
文章路径:http://bjjierui.cn/article/ppggpi.html

其他资讯