2.1 nagios 安装

2017-06-12

nagios 安装

Nagios 官网 http://www.nagios.org

服务器配置

nagios 也需要 apache+php 的环境,CentOS6 默认的 yum 源里没有 nagios 相关的 rpm 包,所以要安装一个 epel 的扩展源。

[root@localhost ~]# yum install -y epel-release

安装 nagios 相关包

[root@localhost ~]# yum install -y httpd nagios nagios-plugins nagios-plugins-all nrpe nagios-plugins-nrpe

设置登录 nagios 后台的用户和密码

[root@localhost ~]# htpasswd -c /etc/nagios/passwd nagiosadmin
New password:
Re-type new password:
Adding password for user nagiosadmin

检查配置文件是否有问题

[root@localhost ~]# 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

启动服务

[root@localhost ~]# service httpd start ; service nagios start

浏览器访问:http://ip/nagios

wKiom1d6U-aQNF9CAABeJ18HdO8522.png

输入用户名 nagiosadmin,密码是刚刚设置的。

wKiom1d6U-jx_vu7AAH0EEUdWcs769.png

此时,nagios 监控的只有 localhost,还没有其他客户端机器,要想添加监控客户机,还需要在客户端安装 nagios 相关的软件包,并且需要在服务端配置。

wKioL1d6U-mSEndiAACdAU7jQiI703.png

wKioL1d6U-rQ8YClAAE22jPTSI4001.png


标题:2.1 nagios 安装
作者:散宜生
地址:https://17kblog.com/articles/2017/06/12/1497262192876.html