Nagios is one of the best enterprise grade server monitoring solutions available. Unlike cPanel, it's available across a wide range of Linux distributions, including Debian and Ubuntu. Since Ubuntu 18.04 is an LTS release, upgrading your servers and running Nagios on them could be a great idea. Even though Nagios isn't up to date in the Ubuntu repositories, and setup isn't turn-key, it's still not too hard to get it running.
This is a companion discussion topic for the original entry at https://linuxconfig.org/install-nagios-on-ubuntu-18-04-bionic-beaver-linux
Grayson Peddie
Why build nagios from source even though nagios is available in the repository?
Bri -> Grayson Peddie
Newer version. I think it’s nagios3 in the repo and it’s nagios4 now
Juan Manuel Saiz
In my case, also I have to install php -> “sudo apt install php libapache2-mod-php”
daddydbag -> Juan Manuel Saiz
that was true for me as well.
Bri -> Juan Manuel Saiz
This should be added to “Install The Requirements”
The most recent Nagios versions have a “make install-daemoninit” option that creates a systemd service file. This command eliminates the need to create /etc/systemd/system/nagios.service
by hand.
Like others, I also needed to install PHP ( “sudo apt install php libapache2-mod-php” ) and think it should be added as a step.