Quick installation how-to for Nagios on openSUSE 11.4 “Celadon” platform. Same procedure applies to other versions of opeSUSE platform. I’m using version 11.4 for my LAB purposes.

lab-gw-01:~ # zypper install nagios
> nagios-devel \
> nagios-nrpe \
> nagios-nsca \
> nagios-plugins \
> nagios-plugins-extras \
> nagios-plugins-nrpe \
> nagios-plugins-zypper \
> nagios-www

Here is how installation will proceed:

Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW packages are going to be installed:
 nagios nagios-devel nagios-nrpe nagios-nsca nagios-plugins nagios-plugins-extras nagios-plugins-nrpe nagios-plugins-zypper nagios-www

The following recommended packages were automatically selected:
 nagios nagios-plugins nagios-www

9 new packages to install.
Overall download size: 3.5 MiB. After the operation, additional 11.7 MiB will be used.
Continue? [y/n/?] (y): y
Retrieving package nagios-plugins-nrpe-2.12-22.3.x86_64 (1/9), 17.0 KiB (38.0 KiB unpacked)
Retrieving: nagios-plugins-nrpe-2.12-22.3.x86_64.rpm [done]
Retrieving package nagios-plugins-1.4.15-3.2.x86_64 (2/9), 657.0 KiB (3.5 MiB unpacked)
Retrieving: nagios-plugins-1.4.15-3.2.x86_64.rpm [done (515.9 KiB/s)]
Retrieving package nagios-nrpe-2.12-22.3.x86_64 (3/9), 31.0 KiB (60.0 KiB unpacked)
Retrieving: nagios-nrpe-2.12-22.3.x86_64.rpm [done]
Retrieving package nagios-plugins-zypper-1.38-3.1.noarch (4/9), 13.0 KiB (27.0 KiB unpacked)
Retrieving: nagios-plugins-zypper-1.38-3.1.noarch.rpm [done]
Retrieving package nagios-3.2.3-3.4.1.x86_64 (5/9), 295.0 KiB (1.0 MiB unpacked)
Retrieving: nagios-3.2.3-3.4.1.x86_64.rpm [done (415.0 KiB/s)]
Retrieving package nagios-plugins-extras-1.4.15-3.2.x86_64 (6/9), 114.0 KiB (600.0 KiB unpacked)
Retrieving: nagios-plugins-extras-1.4.15-3.2.x86_64.rpm [done (291.8 KiB/s)]
Retrieving package nagios-nsca-2.7.2-80.1.x86_64 (7/9), 28.0 KiB (68.0 KiB unpacked)
Retrieving: nagios-nsca-2.7.2-80.1.x86_64.rpm [done]
Retrieving package nagios-www-3.2.3-3.4.1.x86_64 (8/9), 2.4 MiB (6.3 MiB unpacked)
Retrieving: nagios-www-3.2.3-3.4.1.x86_64.rpm [done (688.7 KiB/s)]
Retrieving package nagios-devel-3.2.3-3.4.1.x86_64 (9/9), 40.0 KiB (159.0 KiB unpacked)
Retrieving: nagios-devel-3.2.3-3.4.1.x86_64.rpm [done]
Installing: nagios-plugins-nrpe-2.12-22.3 [done]
Installing: nagios-plugins-1.4.15-3.2 [done]
Additional rpm output:
Starting SuSEconfig, the SuSE Configuration Tool...
Running module permissions only
Reading /etc/sysconfig and updating the system...
Executing /sbin/conf.d/SuSEconfig.permissions...

Installing: nagios-nrpe-2.12-22.3 [done]
Installing: nagios-plugins-zypper-1.38-3.1 [done]
Installing: nagios-3.2.3-3.4.1 [done]
Additional rpm output:
Updating /etc/sysconfig/nagios...

Installing: nagios-plugins-extras-1.4.15-3.2 [done]
Installing: nagios-nsca-2.7.2-80.1 [done]
Installing: nagios-www-3.2.3-3.4.1 [done]
Additional rpm output:
Syntax OK

Installing: nagios-devel-3.2.3-3.4.1 [done]
lab-gw-01:~ #

Once installation is finished nagiosadmin user is automatically assigned with permissions to access and manage Nagios instance. Default admin user definition is placed in /etc/nagios/cgi.cfg file and can be changed. However password file and user is not created. We have to create password file and user for Apache:

lab-gw-01:~ # htpasswd2 -c /etc/nagios/htpasswd.users nagiosadmin
New password:
Re-type new password:
Adding password for user nagiosadmin
lab-gw-01:~ #

Now we can set Apache and Nagios to start automatically after system restart and restart system:

lab-gw-01:~ # chkconfig apache2 on
lab-gw-01:~ # chkconfig nagios on
lab-gw-01:~ # reboot

And eventually start Apache and Nagios to use it immediately without restarting server just after installation:

lab-gw-01:~ # service apache2 start
Starting httpd2 (prefork)                                            done
lab-gw-01:~ # service nagios start
Starting Nagios                                                      done

Now it is possible to connect to fresh instance of Nagios:
When logon window will show up username which needs to be used is nagiosadmin and password which has been assigned to that user with htpasswd2 command.