One, installation of Nagios client for Linux server
Steps:
1, create the directory, upload files to the directory
Mkdir/data
Nagios-plugins-2.1.1.tar.gz
Nrpe-2.12.tar.gz
2. Creating Nagios Groups and users
Groupadd Nagios
Mkdir/usr/local/nagios
Useradd nagios-d/usr/local/nagios-s/sbin/nologin-g Nagios
Chown-r nagios:nagios/usr/local/nagios/
3, Installation Nagios-plugins
Tar zxvf nagios-plugins-2.1.1.tar.gz
CD nagios-plugins-2.1.1
./configure--prefix=/usr/local/nagios--with-user=nagios--with-nagios-group=nagios
Make && make install
4, Installation Nrpe
Tar zxvf nrpe-2.12.tar.gz
CD nrpe-2.12
./configure--prefix=/usr/local/nagios
Make all
Make Install-plugin
Make Install-daemon
Make Install-daemon-config
Make install-xinetd
Chown-r nagios:nagios/usr/local/nagios/
5. Increase Service
Vi/etc/services
Nrpe 5666/udp #nrpe
Nrpe 5666/tcp #nrpe
6. Allow Nagios service access
Vi/etc/xinetd.d/nrpe
Fault: Checking for SSL headers ... configure:error:Cannot find SSL headers
Solution: Yum-y Install Openssl-devel
Fault: Checking for cl.exe ... no
Solution: Yum install-y gcc-c++
Note: If the XINETD service is not installed, you need to install
Yum-y Install xinetd
7. Restart XINETD Service
/etc/init.d/xinetd restart
8. Test the service is normal
Netstat–ntlup See if Port 5666 listens for status
Server-side Use
/usr/local/nagios/libexec/check_nrpe-h 10.0.0.20
Get version Information
NRPE v2.12
Installation of the Nagios client