LINUX自动安装nagiso client插件脚本
#!/bin/bash#!make in 小5 on 2013-05 at picc
###############QQ:1214854702###############################
#scp 10.132.40.13:/usr/local/src/nagios-plugins-1.4.15.tar.gz /usr/local/src/nrpe-2.14.tar.gz
useradd -s /sbin/nologin nagios
cd /usr/local/src/
tar zxvf nagios-plugins-1.4.16.tar.gz
cd nagios-plugins-1.4.16
./configure --prefix=/usr/local/nagios
make && make install
chown -R nagios.nagios /usr/local/nagios
cd /usr/local/src/
tar zxvf nrpe-2.14.tar.gz
cd nrpe-2.14
./configure ; make all ; makeinstall-plugin ; make install-daemon ; make install-daemon-config ;make install-xinetd
if [ "$?" == "0" ];then
echo "installed ok!"
else
exit 1
fi
sed -i 's/127.0.0.1/127.0.0.1 10.128.118.141/g' /etc/xinetd.d/nrpe
echo "nrpe 5666/tcp #nrpe" >> /etc/services
service xinetd restart
chkconfig --add xinetd
chkconfig xinetd on
echo "completeinstalled !"
有竞争才有进步嘛 我是个凑数的。。。 学习了,谢谢分享、、、 男人与女人,终究也只是欲望的动物吧!真的可以因为爱而结合吗?对不起,我也不知道。。 啥时硬件也可以COPY就好了!
页:
[1]