#!/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 nagioscd /usr/local/src/tar zxvf nagios-plugins-1.4.16.tar.gzcd nagios-plugins-1.4.16./configure --prefix=/usr/local/nagiosmake && make installchown -R nagios.nagios /usr/local/nagioscd /usr/local/src/tar zxvf nrpe-2.14.tar.gzcd nrpe-2.14./configure ; make all ; make install-plugin ; make install-daemon ; make install-daemon-config ;make install-xinetdif [ "$?" == "0" ];thenecho "installed ok!"elseexit 1fised -i 's/127.0.0.1/127.0.0.1 10.128.118.141/g' /etc/xinetd.d/nrpeecho "nrpe 5666/tcp #nrpe" >> /etc/servicesservice xinetd restartchkconfig --add xinetd chkconfig xinetd on echo "complete installed !"