nrpe 自动安装脚本

made by G.M

#!/bin/bash
useradd  nagios  -s /sbin/nologin
cd /usr/local/src/
tar -zxvf host_nagios.tar.gz
cd host_nagios
tar -zxvf nagios-plugins-1.4.14.tar.gz
cd nagios-plugins-1.4.14
./configure
make
make install
chown -R nagios:nagios /usr/local/nagios
chown -R nagios:nagios /usr/local/nagios/libexec
cd ../
tar -zxvf nrpe-2.12.tar.gz
cd nrpe-2.12
./configure
make all
make install-plugin
make install-daemon
make install-daemon-config
cd ../
cp nrpe /etc/init.d/
cp nrpe.cfg /usr/local/nagios/etc/
chown -R nagios:nagios /usr/local/nagios
chmod +x /etc/init.d/nrpe
/etc/init.d/nrpe start

个人技术博客地址