Thursday 19 June 2014

Linux - Installing Nagios 4 (Part 1)


  1. sudo apt-get install wget build-essential apache2 php5-gd libgd2-xpm libgd2-xpm-dev libapache2-modphp5 sendmail
  2. cd /tmp
  3. wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.4.tar.gz
  4. wget http://nagios-plugins.org/download/nagios-plugins-2.0.tar.gz
  5. useradd nagios
  6. groupadd nagcmd
  7. usermod -a -G nagcmd nagios
  8. tar zxvf nagios-4.0.4.tar.gz
  9. tar zxvf nagios-plugins-2.0.tar.gz
  10. cd nagios
  11. ./configure --with-nagios-group=nagios --with-command-group=nagcmd
  12. make all
  13. make install
  14. make install-init
  15. make install-config
  16. make install-commandmode
  17. make install-webconf
  18. cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
  19. chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
  20. /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
  21. /etc/init.d/nagios start
  22. htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
  23. cd /tmp/nagios-plugins-2.0
  24. ./configure --with-nagios-user=nagios --with-nagios-group=nagios
  25. make
  26. make install
  27. chkconfig --add nagios
  28. chkconfig --level 35 nagios on
  29. chkconfig --add httpd
  30. chkconfig --level 35 httpd on
  31. ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios


No comments:

Post a Comment