How to Install Nagios 4 in Ubuntu and Debian

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

3 Responses

  1. Thevarx says:

    A simple script to install Nagios Monitoring Tool on Ubuntu and Debian systems.

    apt update
    apt-get install wget build-essential apache2 php apache2 php apache2-mod-php7.0 php-gd libgd-dev sendmail unzip
    useradd nagios
    groupadd nagcmd
    usermod -a -G nagcmd nagios
    usermod -a -G nagios, nagcmd www-data
    cd ~
    tar -zxvf nagios-4.2.0.tar.gz
    cd nagios-4.2.0
    ./configure --with-nagios-group=nagios --with-command-group=nagcmd
    make all
    make install
    make install-commandmode
    make install-init
    make install-config
    /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/site-available/nagios.conf
    cp -R contrib//eventhandlers/ /usr/local/nagios/libexew
    chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
    cd ~
    tar -zxvf nagios-plugins-2.1.2.tar.gz
    cd nagios-plugins-2.1.2
    ./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl
    make install
  2. retalsw says:

    The proper code for step 24 is:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]

  3. skorpinok says:

    I have a Debian 9 strech running nginx webserver, how to configure nagios for nginx ?

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.