Install Nagios NRPE from source code on CentOS or Debian

In order to monitor internal resources of remote systems with Nagios you will need NRPE installed and configured on a client. There will be two pieces to install NRPE daemon and nrpe plugins. This particular install was tested with CentOS and Debian.

Please not for some Debian distros the following fix was applied in order to get it to work.

cd /usr/lib
ln -s


Create nagios user account and password.

/usr/sbin/useradd nagios
passwd nagios

Make directory where you will download nrpe daemon and plugins.

mkdir /downloads
cd /downloads

Download required packages.


Untar and install nagios plugin package.

tar xzf nagios-plugins-2.0.tar.gz
cd nagios-plugins-2.0
make install

Setup proper permissions.

chown nagios.nagios /usr/local/nagios
chown -R nagios.nagios /usr/local/nagios/libexec

Install xinetd service.

yum install xinetd #centos
sudo apt-get install xinetd #debian

Untar and install nrpe package.

tar xzf nrpe-2.15.tar.gz
cd nrpe-2.15

Run this only if you installing on Debian system.

cd /usr/lib
ln -s

Continue for all systems.

make all
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd

Configure xinetd.

edit /etc/xinetd.d/nrpe
only_from = <nagios_ip_address>

Configure nrpe.

edit /etc/services
nrpe 5666/tcp # NRPE

Restart xinetd for changes to take effect.

service xinetd restart

To test and make sure that nrpe is listening on port 5666.

netstat -at | grep nrpe
/usr/local/nagios/libexec/check_nrpe -H localhost

Expected result is NRPE v2.15

This guide only covers client side installation, there will be additional steps that we will need to run on Nagios server side to complete installation