centos yum搭建nagios

一,定义yum非官方库

1, vi /etc/yum.repos.d/dag.repo

   在这之中加入以下内容:

[dag]
name= Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt

2.    手工下载RPM-GPG-KEY.dag.txt(#wget http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt)

rpm --import RPM-GPG-KEY.dag.txt


二,安装

1,安装nagios

yum -y install nagios

service httpd restart

htpasswd -c /etc/nagios/htpasswd.users nagios   创建用户 nagios 用于登录nagios

2,安装 nagios-plugins,否则连localhost都无法监控

yum -y install nagios-plugins

(注意关闭selinux)


可以通过 web访问 nagios了


三,汉化

 wget  http://sourceforge.net/projects/nagios-cn/files/sourcecode/zh_CN%203.2.3/nagios-cn-3.2.3.tar.bz2

 tar jxvf nagios-cn-3.2.3.tar.bz2

 cd nagios-cn-3.2.3

./configure

make all

make install





你可能感兴趣的:(监控,nagios)