0% found this document useful (0 votes)
48 views

How To Install Nagios

The document provides steps to install Nagios on Ubuntu 18.04 including downloading and compiling the Nagios core and plugins source code, creating a nagios user, installing binaries and configuration files, enabling required Apache modules, and starting the Nagios service. Key steps are updating packages, downloading Nagios and plugins source, compiling and installing packages, configuring Apache, and accessing the Nagios web UI.

Uploaded by

MADHAV REDDY KV
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

How To Install Nagios

The document provides steps to install Nagios on Ubuntu 18.04 including downloading and compiling the Nagios core and plugins source code, creating a nagios user, installing binaries and configuration files, enabling required Apache modules, and starting the Nagios service. Key steps are updating packages, downloading Nagios and plugins source, compiling and installing packages, configuring Apache, and accessing the Nagios web UI.

Uploaded by

MADHAV REDDY KV
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

How to Install Nagios?

Nagios Installation
 In this series we will be installing nagios on ubuntu. The
versions used in this series are
 Nagios: 4.4.5
 Nagios Plugin: 2.2.1
 Ubuntu: 18.04
 The installation used in this series will be from the
link over here
 The nagios recommends installing the core version by
downloading, compling and installing the code
 Following are the steps which we will follow
 Update Ubuntu packages and ensure the following
softwares are installed
sudo apt-get update
sudo apt-get install -y autoconf gcc libc6 make wget unzip apache2 php
libapache2-mod-php7.2 libgd-dev

sudo apt-get install -y libmcrypt-dev libssl-dev bc gawk dc build-essential


snmp libnet-snmp-perl gettext

 Download the source of nagios and untar


cd /tmp
wget -O nagioscore.tar.gz
https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.5.tar.gz
tar xzf nagioscore.tar.gz

 Compile the code


cd /tmp/nagioscore-nagios-4.4.5/
sudo ./configure --with-httpd-conf=/etc/apache2/sites-enabled
sudo make all

 Create user and group


sudo make install-groups-users
sudo usermod -a -G nagios www-data
 Install Binaries
sudo make install

 Install Service / Daemon


sudo make install-daemoninit

 Install Command mode


sudo make install-commandmode

 Install Apache Configuration Files


sudo make install-webconf
sudo a2enmod rewrite
sudo a2enmod cgi

 Create nagiosadmin User Account


sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
# Enter password on prompt

 Download the Nagios Plugin source code


cd /tmp
wget --no-check-certificate -O nagios-plugins.tar.gz
https://github.com/nagios-plugins/nagios-plugins/archive/release-2.2.1.tar.gz
tar zxf nagios-plugins.tar.gz

 Compile and Install


cd /tmp/nagios-plugins-release-2.2.1/
sudo ./tools/setup
sudo ./configure
sudo make
sudo make install

 Restart Nagios and apache


sudo systemctl start nagios.service
sudo systemctl stop nagios.service
sudo systemctl restart nagios.service
sudo systemctl status nagios.service

 Now navigate to http://<ipaddress>/nagios

You might also like