How to Install Nagios on Ubuntu 20.04

Install Nagios On Ubuntu 20.04

In this article, we will have explained the necessary steps to install and configure Nagios on Ubuntu 20.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Nagios is an open source monitoring tool used to monitor different Linux Machines or different client hosts. It monitors the HTTP, FTP, SSH, SMTP etc along-with the CPU usage, RAM, Disk Usage and different process that are being running.

Install Nagios On Ubuntu 20.04

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

Step 2. Create User And Group for Nagios.

In order to install Nagios you’ve to create user and group for it along-with the Apache user with the help of below commands:

Step 3. Install Nagios Core on Ubuntu.

Now, download the Nagios from official page or you can get it by the below command through terminal:

Next, compile Nagios using following command:

Step 4. Configuring Nagios on Ubuntu.

Now we Edit the /usr/local/nagios/etc/objects/contacts.cfg file and change the email address associated with the nagiosadmin contact definition to the email address you would like to use for receiving alert notification:

Step 5. Install Nagios Web Interface.

Install the Nagios web interface with the below command:

Then create a user account as “nagiosadmin” for accessing the Nagios web interface. Make sure to save the password you provided on safe place or keep in mind as it will be needed later. To do this run the given command:

Then, restart the Apache services:

Step 6. Starting Nagios on Ubuntu.

Double check the configuration done above by hitting the given command and make sure all configuration pre-checks are okay:

And then enable the Nagios services to start at boot:

Step 7. Access Nagios Web Interface.

Now access the Nagios web interface by going following URL in your web browser:

That’s all you need to do to install Nagios on Ubuntu 20.04 LTS Focal Fossa. I hope you find this quick tip helpful. Don’t forget to share your valuable queries/suggestions in the below comment box & also drop your worthwhile feedback.