诚之和:centos6.4 x86_64 Icinga1.9怎么安装

这篇文章主要为大家展示了“centos6.4 x86_64 Icinga1.9怎么安装”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“centos6.4 x86_64 Icinga1.9怎么安装”这篇文章吧。

1.安装前的系统设置

关闭selinux
vi /etc/sysconfig/selinux
selinux=diabled
关闭iptables
chkconfig iptabels offreboot

2.安装的先决条件:

yum -y install httpd gcc gcc-c++ gd gd-devel
yum -y intall install httpd gcc glibc glibc-common gd gd-devel
yum -y install libjpeg libjpeg-devel libpng libpng-devel
yum -y install net-snmp net-snmp-devel net-snmp-utils
yum -y install libdbi-devel libdbi libdbi-drivers libdbi-dbd-mysql

3.创建用户

useradd icinga
passwd icinga
useradd www
groupadd icinga-cmd
usermod -a -G icinga-cmd icinga
usermod -a -G icinga-cmd www

4.下载软件

wget http://sourceforge.net/projects/icinga-cn/files/icinga-cn/icinga-cn-1.9/icinga-cn-1.9.4.tar.bz2
wget http://sourceforge.net/projects/icinga-cn/files/icinga%20plugins/icinga-nrpe-2.14.tar.gz
wget http://assets.nagios.com/downloads/nagiosplugins/nagios-plugins-1.5.tar.gz

5.开始安装icinga-cn-1.9

tar jxvf icinga-cn-1.9.4.tar.bz2
cd icinga-cn-1.9./configure --with-command-group=icinga-cmdmake allmake fullinstallmake install-configmake cgismake install-cgismake install-htmlmake install-webconf
htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin
完成之后service httpd restart

6.开始安装nagios-plugins

tar zxvf nagios-plugins-1.5.tar.gz
cd nagios-plugins-1.5./configure --prefix=/usr/local/icinga --with-cgiurl=/icinga/cgi-bin
--with-nagios-user=icinga --with-nagios-group=icinga
make
make install

7.启动icinga

chkconfig --add icinga
chkconfig icinga onservice icinga start

8.开始安装icinga-nrpe-2.14

yum -y install  gcc openssl openssl-devel
tar zxvf icinga-nrpe-2.14.tar.gz
cd icinga-nrpe-2.14./configure
make allmake install-plugin

9.启动icinga-nrpe及测试

cd nagios-nrpe-2.14
cp src/nrpe /usr/local/icinga/bin
cp sample-config/nrpe.cfg /usr/local/icinga/etc
启动:
/usr/local/icinga/bin/nrpe -n -c /usr/local/icinga/etc/nrpe.cfg -d
测试:
/usr/local/icinga/libexec/check_nrpe -H 127.0.0.1

10.在客户端上安装icinga-nrpe及测试

host

安装方法同上,修改设置
vi /usr/local/icinga/etc/nrpe.cfg
allowed_hosts=x.x.x.x   /*修改为icinga server的IP
启动/usr/local/icinga/bin/nrpe -n -c /usr/local/icinga/etc/nrpe.cfg -d
在icinga server上测试,执行下面的命令:
/usr/local/icinga/libexec/check_nrpe -H <ip remote host> -n、
反回nrpe版本号,表示成功
(0)

相关推荐