Install Nagios And Lilac on Centos | Instalando Nagios e Lilac no Centos


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #!/bin/sh
  2.  
  3. yum install -y httpd gcc glibc glibc-common gd gd-devel
  4.  
  5. useradd -m nagios
  6. echo '****' |passwd --stdin nagios
  7. groupadd nagcmd
  8. usermod -a -G nagcmd nagios
  9. usermod -a -G nagcmd apache
  10. cd /usr/local/src
  11. #reference: http://sourceforge.net/projects/nagios/
  12. wget http://downloads.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.0/nagios-3.2.0.tar.gz?use_mirror=ufpr
  13.  
  14. tar -zxvf nagios-3.2.0.tar.gz
  15. rm -f nagios-3.2.0.tar.gz
  16.  
  17.  
  18. cd nagios-3.2.0/
  19. ./configure --with-command-group=nagcmd
  20.  
  21.  
  22. make all
  23. make install
  24. make install-init
  25. make install-config
  26. make install-commandmode
  27. make install-webconf
  28.  
  29. htpasswd -nb nagiosadmin **** > /usr/local/nagios/etc/htpasswd.users
  30. service httpd restart
  31.  
  32. #Reference: http://nagiosplugins.org/
  33. wget http://downloads.sourceforge.net/project/nagiosplug/nagiosplug/1.4.14/nagios-plugins-1.4.14.tar.gz?use_mirror=ufpr
  34. tar -zxvf nagios-plugins-1.4.14.tar.gz
  35. rm -f nagios-plugins-1.4.14.tar.gz
  36.  
  37. cd /usr/local/src/nagios-plugins-1.4.14
  38. ./configure --with-nagios-user=nagios --with-nagios-group=nagios
  39. make
  40. make install
  41.  
  42. chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
  43. chcon -R -t httpd_sys_content_t /usr/local/nagios/share/
  44.  
  45. chkconfig --add nagios
  46. chkconfig nagios on
  47. service nagios start
  48.  
  49.  
  50. svn co http://www.lilacplatform.com/svn/lilac/branches/lilac-1.x /var/www/html/lilac
  51. #go to http://<yourserver>/lilac/install.php and resolve dependencies

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.