How do i install Nagios on Ubuntu?

0 votes
How do i install Nagios on Ubuntu?
Feb 26 in DevOps Tools by Kiran

1 answer to this question.

Your answer

Your name to display (optional):
0 votes

 Hey @Kiran, installing Nagios requires you to have apache and php installed. 

let's start with installing apache

sudo apt update
sudo apt install apache2

Install PHP

sudo apt install php php-cgi libapache2-mod-php php-common php-pear php-mbstring

Install nagios Server packages

sudo apt install nagios3 nagios-plugins-basic

The above command will prompt you to create a password for your Nagios account

Configure Nagios server

Go to sudo nano /etc/nagios3/nagios.cfg and make the following changes

# This option allows you to specify whether or not Nagios should check
# for external commands (in the command file defined below).  By default
# Nagios will *not* check for external commands, just to be on the
# cautious side.  If you want to be able to use the CGI command interface
# you will have to enable this.
# Values: 0 = disable commands, 1 = enable commands


Open Nagios apache config file and limit the access from the localhost and local subnet

sudo nano /etc/nagios3/apache2.conf

Adjust Nagios folder permission

sudo chgrp -R www-data /var/lib/nagios3 
chmod 750 /var/lib/nagios3/rw

Restart Nagios and Apache

sudo systemctl restart nagios3.service
sudo systemctl restart apache2.service

Open browser with server hostname or IP address


It'll prompt for username and password

Username- nagiosadmin

Password - Whatever you've created

answered Feb 26 by Riya

Related Questions In DevOps Tools

0 votes
1 answer
0 votes
1 answer

How do I install Splunk on Windows?

Hi haseeb, you can install Splunk Enterprise ...READ MORE

answered Feb 28 in DevOps Tools by Kalgi
0 votes
1 answer
0 votes
1 answer

For Gradle & Spring Boot, how do I choose dependency with implementation?

Below is the answer to your question: Both ...READ MORE

answered Jun 16, 2018 in DevOps Tools by shubham
• 6,500 points
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

How to install Nagios on CentOS?

Follow these steps: Install the required packages yum install ...READ MORE

answered Feb 27 in DevOps Tools by Avinash
