Howto install nagios 3 or nagios server on Ubuntu 12 Debian

Howto install nagios 3 or nagios server on Ubuntu 12 Debian

 

1. Install nagios by apt-get command

user@ubuntu:~$ sudo apt-get install nagios3
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common bsd-mailx libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 libgd2-noxpm libjpeg-turbo8
libjpeg8 libjs-jquery libmysqlclient18 libnet-snmp-perl libperl5.14 libpq5 libradius1 libsensors4 libsnmp-base libsnmp15 libtalloc2 libtdb1 libwbclient0 libxml2 mysql-common nagios-images
nagios-plugins nagios-plugins-basic nagios-plugins-standard nagios3-cgi nagios3-common nagios3-core perl perl-base perl-modules php5-cli php5-common postfix samba-common samba-common-bin
sgml-base smbclient snmp ssl-cert whois xml-core
Suggested packages:
www-browser apache2-doc apache2-suexec apache2-suexec-custom php-pear libgd-tools javascript-common libcrypt-des-perl libdigest-hmac-perl libio-socket-inet6-perl lm-sensors snmp-mibs-downloader
nagios-nrpe-plugin perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl make libpod-plainer-perl procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin dovecot-common
postfix-cdb mail-reader postfix-doc sgml-base-doc cifs-utils openssl-blacklist debhelper
Recommended packages:
apache2 httpd
The following NEW packages will be installed:
apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common bsd-mailx libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 libgd2-noxpm libjpeg-turbo8
libjpeg8 libjs-jquery libmysqlclient18 libnet-snmp-perl libperl5.14 libpq5 libradius1 libsensors4 libsnmp-base libsnmp15 libtalloc2 libtdb1 libwbclient0 libxml2 mysql-common nagios-images
nagios-plugins nagios-plugins-basic nagios-plugins-standard nagios3 nagios3-cgi nagios3-common nagios3-core php5-cli php5-common postfix samba-common samba-common-bin sgml-base smbclient snmp
ssl-cert whois xml-core
The following packages will be upgraded:
perl perl-base perl-modules
3 upgraded, 47 newly installed, 0 to remove and 41 not upgraded.
Need to get 39.3 MB of archives.
After this operation, 122 MB of additional disk space will be used.
Do you want to continue [Y/n]?y……………Selecting previously unselected package libjs-jquery.
Unpacking libjs-jquery (from …/libjs-jquery_1.7.2+debian-1ubuntu1_all.deb) …
Selecting previously unselected package libnet-snmp-perl.
Unpacking libnet-snmp-perl (from …/libnet-snmp-perl_6.0.1-2_all.deb) …
Selecting previously unselected package libperl5.14.
Unpacking libperl5.14 (from …/libperl5.14_5.14.2-13ubuntu0.1_amd64.deb) …
Selecting previously unselected package libpq5.
Unpacking libpq5 (from …/libpq5_9.1.7-0ubuntu12.10_amd64.deb) …
Selecting previously unselected package libsnmp-base.
Unpacking libsnmp-base (from …/libsnmp-base_5.4.3~dfsg-2.5ubuntu1_all.deb) …
Selecting previously unselected package libsnmp15.
Unpacking libsnmp15 (from …/libsnmp15_5.4.3~dfsg-2.5ubuntu1_amd64.deb) …
Selecting previously unselected package nagios-images.
Unpacking nagios-images (from …/nagios-images_0.7_all.deb) …
Selecting previously unselected package nagios-plugins-basic.
Unpacking nagios-plugins-basic (from …/nagios-plugins-basic_1.4.15-5ubuntu4_amd64.deb) …
Selecting previously unselected package nagios3-common.
Unpacking nagios3-common (from …/nagios3-common_3.4.1-2_all.deb) …
Selecting previously unselected package nagios3-cgi.
Unpacking nagios3-cgi (from …/nagios3-cgi_3.4.1-2_amd64.deb) …
Selecting previously unselected package nagios3-core.
Unpacking nagios3-core (from …/nagios3-core_3.4.1-2_amd64.deb) …
Selecting previously unselected package nagios3.
Unpacking nagios3 (from …/nagios3_3.4.1-2_amd64.deb) …
Selecting previously unselected package php5-cli.
Unpacking php5-cli (from …/php5-cli_5.4.6-1ubuntu1.1_amd64.deb) …
Selecting previously unselected package sgml-base.
Unpacking sgml-base (from …/sgml-base_1.26+nmu3ubuntu1_all.deb) …
Selecting previously unselected package snmp.
Unpacking snmp (from …/snmp_5.4.3~dfsg-2.5ubuntu1_amd64.deb) …
Selecting previously unselected package whois.
Unpacking whois (from …/whois_5.0.19_amd64.deb) …
Selecting previously unselected package xml-core.
Unpacking xml-core (from …/xml-core_0.13+nmu1_all.deb) …
Selecting previously unselected package libradius1.
Unpacking libradius1 (from …/libradius1_0.3.2-14build1_amd64.deb) …
Selecting previously unselected package nagios-plugins-standard.
Unpacking nagios-plugins-standard (from …/nagios-plugins-standard_1.4.15-5ubuntu4_amd64.deb) …
Selecting previously unselected package nagios-plugins.
Unpacking nagios-plugins (from …/nagios-plugins_1.4.15-5ubuntu4_all.deb) …
Processing triggers for man-db …
Processing triggers for ureadahead …
Processing triggers for ufw …
Setting up libcap2:amd64 (1:2.22-1ubuntu4) …
Setting up libjpeg-turbo8:amd64 (1.2.1-0ubuntu2) …
Setting up mysql-common (5.5.29-0ubuntu0.12.10.1) …
Setting up libmysqlclient18:amd64 (5.5.29-0ubuntu0.12.10.1) …
Setting up libsensors4:amd64 (1:3.3.1-2ubuntu2) …
Setting up libtalloc2:amd64 (2.0.7+git20120207-1) …
Setting up libtdb1:amd64 (1.2.10-2) …
Setting up libwbclient0:amd64 (2:3.6.6-3ubuntu5) …
Setting up libxml2:amd64 (2.8.0+dfsg1-5ubuntu2.1) …
Setting up php5-common (5.4.6-1ubuntu1.1) …Creating config file /etc/php5/mods-available/pdo.ini with new version
Setting up samba-common (2:3.6.6-3ubuntu5) …Creating config file /etc/samba/smb.conf with new version
Setting up samba-common-bin (2:3.6.6-3ubuntu5) …
update-alternatives: using /usr/bin/nmblookup.samba3 to provide /usr/bin/nmblookup (nmblookup) in auto mode
update-alternatives: using /usr/bin/net.samba3 to provide /usr/bin/net (net) in auto mode
update-alternatives: using /usr/bin/testparm.samba3 to provide /usr/bin/testparm (testparm) in auto mode
Setting up smbclient (2:3.6.6-3ubuntu5) …
Setting up libjpeg8:amd64 (8c-2ubuntu7) …
Setting up libgd2-noxpm:amd64 (2.0.36~rc1~dfsg-6ubuntu3) …
Setting up libapr1 (1.4.6-3) …
Setting up libaprutil1 (1.4.1-3) …
Setting up libaprutil1-dbd-sqlite3 (1.4.1-3) …
Setting up libaprutil1-ldap (1.4.1-3) …
Setting up apache2.2-bin (2.2.22-6ubuntu2.1) …
Setting up apache2-utils (2.2.22-6ubuntu2.1) …
Setting up ssl-cert (1.0.32) …
Setting up postfix (2.9.3-2ubuntu2.1) …
Adding group `postfix’ (GID 111) …
Done.
Adding system user `postfix’ (UID 104) …
Adding new user `postfix’ (UID 104) with group `postfix’ …
Not creating home directory `/var/spool/postfix’.
Creating /etc/postfix/dynamicmaps.cf
Adding tcp map entry to /etc/postfix/dynamicmaps.cf
Adding sqlite map entry to /etc/postfix/dynamicmaps.cf
Adding group `postdrop’ (GID 112) …
Done.
setting myhostname: ubuntu
setting alias maps
setting alias database
mailname is not a fully qualified domain name. Not changing /etc/mailname.
setting destinations: ubuntu, localhost.localdomain, , localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix is now set up with a default configuration. If you need to make
changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run ‘/etc/init.d/postfix reload’.

Running newaliases
* Stopping Postfix Mail Transport Agent postfix [ OK ]
* Starting Postfix Mail Transport Agent postfix [ OK ]
Setting up libjs-jquery (1.7.2+debian-1ubuntu1) …
Setting up libperl5.14 (5.14.2-13ubuntu0.1) …
Setting up libpq5 (9.1.7-0ubuntu12.10) …
Setting up libsnmp-base (5.4.3~dfsg-2.5ubuntu1) …
Setting up libsnmp15 (5.4.3~dfsg-2.5ubuntu1) …
Setting up nagios-images (0.7) …
Setting up nagios-plugins-basic (1.4.15-5ubuntu4) …

Creating config file /etc/nagios-plugins/config/apt.cfg with new version

Creating config file /etc/nagios-plugins/config/dhcp.cfg with new version

Creating config file /etc/nagios-plugins/config/disk.cfg with new version

Creating config file /etc/nagios-plugins/config/dummy.cfg with new version

Creating config file /etc/nagios-plugins/config/ftp.cfg with new version

Creating config file /etc/nagios-plugins/config/http.cfg with new version

Creating config file /etc/nagios-plugins/config/load.cfg with new version

Creating config file /etc/nagios-plugins/config/mail.cfg with new version

Creating config file /etc/nagios-plugins/config/news.cfg with new version

Creating config file /etc/nagios-plugins/config/ntp.cfg with new version

Creating config file /etc/nagios-plugins/config/ping.cfg with new version

Creating config file /etc/nagios-plugins/config/procs.cfg with new version

Creating config file /etc/nagios-plugins/config/real.cfg with new version

Creating config file /etc/nagios-plugins/config/ssh.cfg with new version

Creating config file /etc/nagios-plugins/config/tcp_udp.cfg with new version

Creating config file /etc/nagios-plugins/config/telnet.cfg with new version

Creating config file /etc/nagios-plugins/config/users.cfg with new version
Setting up php5-cli (5.4.6-1ubuntu1.1) …

Creating config file /etc/php5/cli/php.ini with new version
update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode
Setting up sgml-base (1.26+nmu3ubuntu1) …
Updating the super catalog…
Setting up snmp (5.4.3~dfsg-2.5ubuntu1) …
Setting up whois (5.0.19) …
Setting up xml-core (0.13+nmu1) …
update-catalog: Suppressing action on super catalog. Invoking trigger instead.
update-catalog: Please rebuild the package being set up with a version of debhelper fixing #477751.
Setting up libradius1 (0.3.2-14build1) …
Setting up nagios-plugins-standard (1.4.15-5ubuntu4) …

Creating config file /etc/nagios-plugins/config/breeze.cfg with new version

Creating config file /etc/nagios-plugins/config/disk-smb.cfg with new version

Creating config file /etc/nagios-plugins/config/dns.cfg with new version

Creating config file /etc/nagios-plugins/config/flexlm.cfg with new version

Creating config file /etc/nagios-plugins/config/fping.cfg with new version

Creating config file /etc/nagios-plugins/config/games.cfg with new version

Creating config file /etc/nagios-plugins/config/hppjd.cfg with new version

Creating config file /etc/nagios-plugins/config/ifstatus.cfg with new version

Creating config file /etc/nagios-plugins/config/ldap.cfg with new version

Creating config file /etc/nagios-plugins/config/mailq.cfg with new version

Creating config file /etc/nagios-plugins/config/mrtg.cfg with new version

Creating config file /etc/nagios-plugins/config/mysql.cfg with new version

Creating config file /etc/nagios-plugins/config/netware.cfg with new version

Creating config file /etc/nagios-plugins/config/nt.cfg with new version

Creating config file /etc/nagios-plugins/config/pgsql.cfg with new version

Creating config file /etc/nagios-plugins/config/radius.cfg with new version

Creating config file /etc/nagios-plugins/config/rpc-nfs.cfg with new version

Creating config file /etc/nagios-plugins/config/snmp.cfg with new version
Setting up nagios-plugins (1.4.15-5ubuntu4) …
Processing triggers for ureadahead …
Processing triggers for ufw …
Setting up bsd-mailx (8.1.2-0.20111106cvs-1build1) …
update-alternatives: using /usr/bin/bsd-mailx to provide /usr/bin/mailx (mailx) in auto mode
Setting up nagios3-common (3.4.1-2) …
Adding system-user for nagios
* Starting nagios3 monitoring daemon nagios3 [ OK ]
Setting up perl-modules (5.14.2-13ubuntu0.1) …
Setting up perl (5.14.2-13ubuntu0.1) …
Setting up apache2.2-common (2.2.22-6ubuntu2.1) …
Enabling site default.
Enabling module alias.
Enabling module autoindex.
Enabling module dir.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module status.
Enabling module auth_basic.
Enabling module deflate.
Enabling module authz_default.
Enabling module authz_user.
Enabling module authz_groupfile.
Enabling module authn_file.
Enabling module authz_host.
Enabling module reqtimeout.
Setting up libnet-snmp-perl (6.0.1-2) …
Processing triggers for ureadahead …
Setting up nagios3-core (3.4.1-2) …
Processing triggers for ufw …
Setting up apache2-mpm-prefork (2.2.22-6ubuntu2.1) …
* Starting web server apache2 apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
Setting up libapache2-mod-php5 (5.4.6-1ubuntu1.1) …

Creating config file /etc/php5/apache2/php.ini with new version
* Restarting web server apache2 apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
… waiting apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
Setting up nagios3-cgi (3.4.1-2) …

Creating config file /etc/nagios3/apache2.conf with new version
* Reloading web server config apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
Adding password for user nagiosadmin
Setting up nagios3 (3.4.1-2) …
Processing triggers for libc-bin …
ldconfig deferred processing now taking place
Processing triggers for sgml-base …
Updating the super catalog…
user@ubuntu:~$

In your installation steps, you have to do some wizards about email and nagiosadmin password

2. Start nagios on Ubuntu

user@ubuntu:~$ sudo /etc/init.d/nagios3 start
* Starting nagios3 monitoring daemon nagios3 * already running!
[ OK ]
user@ubuntu:~$

3. Access to Nagios web interface

http://x.x.x.x/nagios3

username: nagiosadmin

password: defined when you install

 

That’s all. Thanks for using IThelpblog.com.

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>