On Debian 13:
sudo apt update
sudo apt install -y build-essential libssl-dev libgd-dev libjson-perl libwww-perl apache2 php libapache2-mod-php unzip wget
On RHEL 10:
sudo dnf install -y gcc make openssl-devel gd-devel perl-JSON perl-libwww-perl httpd php php-gd unzip wget
sudo useradd -r -m -d /usr/local/naemon -s /bin/bash naemon
sudo groupadd naemon
sudo usermod -aG naemon naemon
On Debian 13:
sudo usermod -aG naemon www-data
On RHEL 10:
sudo usermod -aG naemon apache
cd /tmp
wget https://github.com/Naemon/naemon-core/releases/download/1.2.0/naemon-1.2.0.tar.gz
tar -xzf naemon-1.2.0.tar.gz
cd naemon-1.2.0
./configure \
--sysconfdir=/etc/naemon \
--localstatedir=/var/naemon \
--libexecdir=/usr/lib/naemon/plugins \
--with-httpd-conf=/etc/apache2/sites-available \
--with-command-group=naemon
make all
sudo make install
sudo make install-init
sudo make install-commandmode
sudo make install-config
sudo make install-webconf
On RHEL 10, use:
./configure \
--sysconfdir=/etc/naemon \
--localstatedir=/var/naemon \
--libexecdir=/usr/lib/naemon/plugins \
--with-httpd-conf=/etc/httpd/conf.d \
--with-command-group=naemon
cd /tmp
wget https://github.com/naemon/naemon-plugins/releases/download/v4.1.1/naemon-plugins-4.1.1.tar.gz
tar -xzf naemon-plugins-4.1.1.tar.gz
cd naemon-plugins-4.1.1
./configure --with-naemon-user=naemon --with-naemon-group=naemon
make
sudo make install
sudo htpasswd -c /etc/naemon/htpasswd.users naemonadmin
On Debian 13:
sudo a2enmod rewrite
sudo a2enmod headers
sudo ln -s /etc/apache2/sites-available/naemon.conf /etc/apache2/conf-enabled/
sudo systemctl restart apache2
On RHEL 10:
sudo systemctl restart httpd
On Debian 13:
sudo systemctl enable --now naemon
sudo systemctl enable --now apache2
On RHEL 10:
sudo systemctl enable --now naemon
sudo systemctl enable --now httpd
On UFW:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
On firewalld:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
Open http://SERVER_IP/naemon and log in with username naemonadmin and the password you set.
Edit /etc/naemon/conf.d/hosts.cfg:
define host {
use linux-server
host_name webserver01
alias Web Server 01
address 192.168.1.100
}
Edit /etc/naemon/conf.d/services.cfg:
define service {
use generic-service
host_name webserver01
service_description HTTP
check_command check_http
}
Edit /etc/naemon/conf.d/contacts.cfg:
define contact {
contact_name admin
alias System Administrator
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email admin@example.com
}
sudo naemon -v /etc/naemon/naemon.cfg
On monitored hosts:
sudo apt install -y nagios-nrpe-server nagios-plugins-standard # Debian
sudo dnf install -y nrpe nagios-plugins-all # RHEL
Configure /etc/nagios/nrpe.cfg:
allowed_hosts=127.0.0.1,NAEMON_SERVER_IP
sudo systemctl enable --now nrpe
See Naemon Hardening.
Setting up monitoring systems can be complex. We offer consulting services for:
Contact us at office@linux-server-admin.com or visit our contact page.
Prefer automation? See Naemon Ansible Setup for an example playbook.
Prefer containers? See Naemon Docker Setup.
See Naemon Configuration for configuration guidance.
See Naemon Security for hardening guidance.