任务三、Nagios-Client的安装
3.1、关闭防火墙和selinux
注:
#systemctl stop firewalld.service
#systemctl disable firewalld.service
#vi /etc/selinux/config
3.2、配置环境
#yum install gcc glibc-common -y
#yum install gd gd-devel openssl openssl-devel -y
#yum install php php-gd perl net-tools -y
3.3、安装Nagios-plugin
添加nagios用户
#useradd -s /sbin/nologin nagios
解压安装
#tar zxvf Nagios-plugins-2.2.1.tar.gz
#cd Nagios-plugins-2.2.1
#./configure –with-nagios-user=Nagios –with-nagios-group=Nagios
#make $$ make install
3.4、安装nrpe
#tar zxvf nrpe-3.2.1.tar.gz
#cd nrpe-3.2.1
#./configure –with-nrpe-user=Nagios \
--with-nrpe-group=Nagios \
--with-nagios-user=Nagios \
--with-nagios-group=Nagios \
--enable-command-args \
--enable-ssl
#make all
#make install-plugin
#make install-daemon
#make install-daemon-config
#ls /usr/local/nagios/libexec/ |grep check_nrpe
#/usr/local/Nagios/bin/nrpe -d -c /usr/local/Nagios/etc/nrpe.cfg