Skip to content

imraneee1528/Nagios

Repository files navigation

Nagios Full Installations

sudo apt update && apt upgrade -y  
sudo apt install autoconf gcc libc6 make wget unzip apache2 apache2-utils php libgd-dev libmcrypt-dev libssl-dev bc gawk dc build-essential snmp libnet-snmp-perl gettext
sudo useradd -m -s /bin/bash nagios
sudo groupadd nagcmd
sudo usermod -a -G nagcmd nagios
sudo usermod -a -G nagcmd www-data
  cd /tmp
  wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.5.9.tar.gz ./
  
  tar -zxvf nagios-4.5.9.tar.gz
  mv /opt/nagios-4.5.9
  cd /opt/nagios-4.5.9/

Nagios in ubuntu and compile it

./configure --with-nagios-group=nagios --with-command-group=nagcmd
make all

Install Nagios Core Binaries and Web Interface Files

sudo make install
sudo make install-commandmode
sudo make install-init
sudo make install-config
sudo /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-available/nagios.conf

Install Nagios on Ubuntu Plugins

cd /tmp
wget http://www.nagios-plugins.org/download/nagios-plugins-2.4.9.tar.gz
mv nagios-plugins-2.4.9 /opt/
cd nagios-plugins-2.4.9/
sudo ./configure --with-nagios-user=nagios --with-nagios-group=nagcmd --with-openssl
make install

Nagios configuration and restart Nagios

sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
sudo systemctl restart nagios
sudo systemctl restart apache2

Configure Apache Web Server

  sudo ln -s /etc/apache2/sites-available/nagios.conf /etc/apache2/sites-enabled/
sudo a2enmod rewrite
sudo a2enmod cgi

Set admin Password

  sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Start Nagios and Apache Services

sudo systemctl enable nagios
sudo systemctl enable apache2
sudo systemctl restart nagios
sudo systemctl restart apache2

Logging with user password

http://192.168.122.61/nagios/  

About

Nagios full deployment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages