tar xzf nagios-3.5.1.tar.gz
cd nagios
./configure --with-command-group=nagcmd
make all
make install
make install-init
#初始化,生成启动脚本
make install-config
#安装目录许可,web文件
make install-commandmode
#安装配置文件模版
make install-webconf
#生成web.conf,等同于nagios在web界面登录的配置文件。
htpasswd -cb /usr/local/nagios/etc/htpasswd.users admin 123456
安装插件nagios-plugins-1.4.16.tar.gz
yum -y install perl-devel
#perl-devel是必须的
tar zxf nagios-plugins-1.4.16.tar.gz
cd nagios-plugins-1.4.16
./configure --with-nagios-user=nagios --with-nagios-group=nagios --enable-perl-modules
make && make install
cd ../
ls /usr/local/nagios/libexec/|wc -l
#根据环境安装不等的插件,多少没关系。
安装nrpe
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 ..
生产用于检测客户端的nrpe, 当然也用来检测自己