Ubuntu Server - Nagios Core

Assuming the server already pre-installed amongst the next :-

  • Ubuntu Server 14.04.1 LTS x64.
  • OpenSSH
  • Hostname : SVR01
  • Username : master

Follow these steps-by-steps :-

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo /etc/network/interfaces
    • static
    • address 192.168.4.248
    • netmask 255.255.255.0
    • gateway 192.168.4.1
    • network 192.168.4.0
    • broadcast 192.168.4.255
    • dns-nameservers 202.188.0.133 202.188.1.5
  4. sudo apt-get install \
    • wget \
    • build-essential \
    • apache2 \
    • apache2-utils \
    • libapache2-mod-php5 \
    • php5-gd \
    • libgd2-xpm-dev \
    • postfix
  5. When prompted for electronic mail address as well as SMTP server, only run the desired electronic mail address (preferably an information technology Admin email) as well as the SMTP server address.
  6. sudo useradd --system --home /usr/local/nagios -M nagios
  7. sudo groupadd --system nagcmd
  8. sudo usermod -a -G nagcmd nagios
  9. sudo usermod -a -G nagcmd www-data
  10. cd /tmp
  11. sudo wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.8.tar.gz (a newer version peradventure available during this post, delight cheque Nagios website).
  12. sudo wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz (a newer version of plugins peradventure available during this post, delight cheque Nagios website).
  13. tar -xzvf nagios-4.0.8.tar.gz
  14. tar -xzvf nagios-plugins-2.0.3.tar.gz
  15. cd nagios-4.0.8
  16. sudo ./configure \
    • --with-nagios-group=nagios\
    • --with-command-group nagcmd \
    • --with-mail=/usr/sbin/sendmail \
    • --with-httpd_conf=/etc/apache2/conf-available
  17. sudo brand all
  18. sudo brand install
  19. sudo brand install-init
  20. sudo brand install-config
  21. sudo brand install-commandmode
  22. sudo brand install-webconf
  23. sudo cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
  24. sudo chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
  25. sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (verify Nagios configuration is right or not).
  26. sudo ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
  27. cd ..
  28. cd nagios-plugins-2.0.3
  29. sudo ./configure \
    • --with-nagios-user=nagios \
    • --with-nagios-group=nagios \
    • --enable-perl-modules \
    • --enable-extra-opts
  30. sudo make
  31. sudo brand install
  32. sudo a2enmod cgi
  33. sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin (when prompted for password, key-in your preferred password, this volition hold out run during login to the Web GUI).
  34. sudo nano /etc/apache2/sites-enabled/000-default.conf
    • Type --> Include conf-available/nagios.conf
  35. sudo nano /etc/apache2/conf-available/fqdn.conf
    • Type --> SVR01 localhost
  36. sudo a2enconf fqdn
  37. sudo nano /usr/local/nagios/etc/objects/contacts.cfg
  38. sudo service apache2 restart
  39. sudo service nagios start
Now from around other PC amongst Windows, opened upward Internet Explorer :-
URL = http://192.168.4.248/nagios

When prompted for username as well as password :-
Username = master
Password = [the password you lot convey specified earlier]

0 Response to "Ubuntu Server - Nagios Core"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel