5ol.cc 发表于 2019-1-13 06:29:19

2.1 nagios 安装

           Nagios 官网 http://www.nagios.org
           服务器配置
           nagios 也需要 apache+php 的环境,CentOS6默认的 yum 源里没有 nagios 相关的rpm包,所以要安装一个epel的扩展源。
# yum install -y epel-release           安装nagios相关包
# yum install -y httpd nagios nagios-plugins nagios-plugins-all nrpe nagios-plugins-nrpe           设置登录nagios后台的用户和密码
# htpasswd -c /etc/nagios/passwd nagiosadmin
New password:
Re-type new password:
Adding password for user nagiosadmin            检查配置文件是否有问题
# nagios -v /etc/nagios/nagios.cfg
Total Warnings: 0
Total Errors:   0
Things look okay - No serious problems were detected during the pre-flight check           启动服务
# service httpd start ; service nagios start           浏览器访问:http://ip/nagios
http://s4.运维网.com/wyfs02/M02/83/B1/wKiom1d6U-aQNF9CAABeJ18HdO8522.png
  

               输入用户名 nagiosadmin,密码是刚刚设置的。
http://s4.运维网.com/wyfs02/M01/83/B1/wKiom1d6U-jx_vu7AAH0EEUdWcs769.png
  

           此时,nagios监控的只有localhost,还没有其他客户端机器,要想添加监控客户机,还需要在客户端安装nagios相关的软件包,并且需要在服务端配置。
http://s4.运维网.com/wyfs02/M02/83/AF/wKioL1d6U-mSEndiAACdAU7jQiI703.png
  

http://s4.运维网.com/wyfs02/M00/83/AF/wKioL1d6U-rQ8YClAAE22jPTSI4001.png
  




页: [1]
查看完整版本: 2.1 nagios 安装