- Prerequirement
106 apt-get install libgd2-xpm-dev
107 /usr/sbin/useradd -m -s /bin/bash nagios
108 passwd nagios
109 /usr/sbin/groupadd nagcmd
110 /usr/sbin/usermod -a -G nagcmd nagios
111 /usr/sbin/usermod -a -G nagcmd www-data
- Download Nagios
115 cd download/
116 wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.5.0.tar.gz
117 wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz
- Install Nagios
119 cd nagios/
120 ./configure --with-command-group=nagcmd
=================================================================
General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagcmd
Embedded Perl: no
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Lock file: ${prefix}/var/nagios.lock
Check result directory: ${prefix}/var/spool/checkresults
Init directory: /etc/init.d
Apache conf.d directory: /etc/apache2/conf.d
Mail program: /bin/mail
Host OS: linux-gnu
Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP):
- Install latest ssl library
apt-cache search libssl | grep SSL
libssl-dev - SSL development libraries, header files and documentation
libssl-doc - SSL development documentation documentation
libssl1.0.0 - SSL shared libraries
libssl-ocaml - OCaml bindings for OpenSSL (runtime)
libssl-ocaml-dev - OCaml bindings for OpenSSL
libssl0.9.8 - SSL shared libraries
libsslcommon2 - enterprise messaging system - common SSL libraries
libsslcommon2-dev - enterprise messaging system - common SSL development file
Install SSL library
apt-get install libssl1.0.0 libssl-dev
- Install Nagios plugin
134 cd nagios-plugins-1.4.16/
135 ./configure --with-nagios-user=nagios --with-nagios-group=nagios
146 make
147 make install
- Start Nagios
Configure Nagios to automatically start when the system boots.
ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
Verify the sample Nagios configuration files.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
If there are no errors, start Nagios.
/etc/init.d/nagios start
No comments:
Post a Comment