How to Install Nagios on Ubuntu 16.04 Xenial 32/64-bit

April 5, 2017 | By the+gnu+linux+evangelist | Filed in: Tutorial.

Install Nagios Ubuntu 16.04 Xenial

You are Welcome! The Tutorial Shows You Step-by-Step How to Install Nagios on Ubuntu 16.04 Xenial LTS 32/64-bit GNU/Linux Desktops.

First, Latest Nagios for Ubuntu is a Powerful Monitoring System that enables Organizations to Identify and Resolve IT Infrastructure Problems before they affect Critical Business Processes.

Furthermore, the Nagios Workflow Management Features are:

  • Monitoring: IT staff configure Nagios to monitor critical IT infrastructure components
  • Alerting: Nagios sends alerts when critical infrastructure components fail and recover
  • Response: IT staff can acknowledge alerts and begin resolving outages and investigating security alerts immediately
  • Reporting: Reports provide a historical record of outages, events, notifications, and alert response for later review
  • Maintenance: Scheduled downtime prevents alerts during scheduled maintenance and upgrade windows
  • Planning: Trending and capacity planning graphs and reports allow you to identify necessary infrastructure upgrades before failures occur.
How to Install Nagios on Ubuntu 16.04 - Featured
  1. First, Open a Shell Terminal emulator window
    (Press “Enter” to Execute Commands)

    How to Install Nagios Ubuntu 16.04 - Open Terminal
  2. Then Install the Required Packages
    Logins as SuperUser to make shorter the others commmands:

    sudo su

    If Got “User is Not in Sudoers file” then see: How to Enable sudo

    So to Install the Packages:

    apt install php7.0-gd libgd2-xpm-dev build-essential 
    apache2 libapache2-mod-php7.0
  3. After to Add nagios User and Groups
    Create the nagios User:

    useradd nagios

    Make the nagios Group:

    groupadd nagios

    Add the nagios user to the group:

    /usr/sbin/usermod -G nagios nagios

    Create a new nagcmd group for allowing external commands to be submitted through the web interface:

    groupadd nagcmd

    Add both the nagios & apache users to the Group:

    usermod -a -G nagcmd nagios
    usermod -a -G nagcmd www-data

    Last Achieve the SuperUser Session:

  4. Download Latest Nagios Core Linux Source

    Nagios Core tar.gz Archive
  5. Then Double-Click and Extract Nagios Core into /tmp

    How to Install Nagios Ubuntu 16.04 - Extracting Nagios

    Or from Command Line:

    tar zxvf ~/Downloads/nagios*.tar.gz -C /tmp/
  6. Furthermore, to Compile and Install Nagios Core for Ubuntu

    cd /tmp/nagios*
    ./configure --with-command-group=nagcmd
    make all
    sudo su

    If Got “User is Not in Sudoers file” then see: How to Enable sudo

    make install
    make install-init
    make install-config
    make install-commandmode
  7. Follow Installing Nagios Core Web Interface
    First, Make the needed directory:

    mkdir -p /etc/httpd/conf.d/nagios.conf

    And the Install it:

    make install-webconf
  8. After make the Post-Installation Configuration

    cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
    chown -R nagios:nagcmd /usr/local/nagios/libexec/eventhandlers
  9. Again to Check Nagios Installation

    /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
  10. And to Enable the Web Interface on Apache

    /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-enabled/nagios.conf
    a2enmod cgi
    service apache2 restart
  11. Finally, to Start up Nagios

    /etc/init.d/nagios start
  12. Again to Create a nagiosadmin Web User with Pass

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

    Take Note of the Password!

  13. And to Access the Nagios Web Interface


    User: ‘nagiosadmin’
    Pass: That You Setup Before

  14. Download and Install Nagios Plugins

    Nagios Plugins Installation

How to Install Nagios Ubuntu 16.04 - Nagios Web Interface

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

QuickChic Theme • Powered by WordPress