nagios 安装
Nagios 官网 http://www.nagios.org 服务器配置nagios 也需要 apache+php 的环境,CentOS6默认的 yum 源里没有 nagios 相关的rpm包,所以要安装一个epel的扩展源。
1
# yum install -y epel-release
安装nagios相关包
1
# yum install -y httpd nagios nagios-plugins nagios-plugins-all nrpe nagios-plugins-nrpe
设置登录nagios后台的用户和密码
1
2
3
4
# htpasswd -c /etc/nagios/passwd nagiosadmin
New password:
Re-type new password:
Adding password for user nagiosadmin
检查配置文件是否有问题
1
2
3
4
5
# 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
启动服务
1
# service httpd start ; service nagios start
浏览器访问:http://ip/nagios
输入用户名 nagiosadmin,密码是刚刚设置的。
此时,nagios监控的只有localhost,还没有其他客户端机器,要想添加监控客户机,还需要在客户端安装nagios相关的软件包,并且需要在服务端配置。
# useradd -s /sbin/nologin nagios
# mkdir /usr/local/nagios
# chown -R nagios.nagios /usr/local/nagios
这个安装不用添加用户么
?
页:
[1]