标签:
yum install -y gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel xinetd
打开:http://sourceforge.net/projects/nagios/files/nrpe-2.x/
wget http://liquidtelecom.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz
useradd nagios
passwd nagios
#tar xzf nrpe-2.15.tar.gz
# cd nrpe-2.15
#./configure
#make all
#make install-plugin
#make install-daemon
#make install-daemon-config
#make install-xinetd
vi /etc/xinetd.d/nrpe
only_from = 127.0.0.1,Server_IP
vi /etc/services 添加
nrpe 5666/tcp # NRPE
vi /etc/sysconfig/iptables
添加5666端口 重启iptables
chown nagios.nagios /usr/local/nagios
chown -R nagios.nagios /usr/local/nagios/libexec
./usr/local/nagios/libexec/check_nrpe -H localhost
yum -y install nagios-plugins-all nagios-plugins-nrpe
nagios-plugins目录:/usr/lib64/nagios/plugins/check_disk
vi /usr/local/nagios/etc/nrpe.cfg修改
allowed_hosts=127.0.0.1,yourServerIP
注释掉目录不存在的nagios插件命令
标签:
原文地址:http://www.cnblogs.com/Mrhuangrui/p/4584565.html