- sudo apt-get install wget build-essential apache2 php5-gd libgd2-xpm libgd2-xpm-dev libapache2-modphp5 sendmail
- cd /tmp
- wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.4.tar.gz
- wget http://nagios-plugins.org/download/nagios-plugins-2.0.tar.gz
- useradd nagios
- groupadd nagcmd
- usermod -a -G nagcmd nagios
- tar zxvf nagios-4.0.4.tar.gz
- tar zxvf nagios-plugins-2.0.tar.gz
- cd nagios
- ./configure --with-nagios-group=nagios --with-command-group=nagcmd
- make all
- make install
- make install-init
- make install-config
- make install-commandmode
- make install-webconf
- cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
- chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
- /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
- /etc/init.d/nagios start
- htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
- cd /tmp/nagios-plugins-2.0
- ./configure --with-nagios-user=nagios --with-nagios-group=nagios
- make
- make install
- chkconfig --add nagios
- chkconfig --level 35 nagios on
- chkconfig --add httpd
- chkconfig --level 35 httpd on
- ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
Thursday, 19 June 2014
Linux - Installing Nagios 4 (Part 1)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment