Since I was looking to learn how to use an already installed copy of nagios on a work system I decided to do a quick install on my own network by rpm:
[root@paulororke nagios]# rpm -ivf nagios-1.2-2.1.fc2.rf.i386.rpm
The rpm put thing in a different place to what the
documentation for the src install describes. I believe the configuration files required are essentially the same so I will try to document here when the file locations differ from the official documentation.
Installation Directory
According to the
documentation for the src install, there should be a directory structure in
/usr/local/nagios like the following excerpt from the Nagios docs:
[
show table]
What I got after installing from RPM looked more like this:
[ show output] So I'll just refer to the files by name and you'll have to locate them yourself. The package installation also took care of setting the nagios daemon to run at startup. This can be verified by:
[root@paulororke nagios]# chkconfig --list |grep nagios
nagios 0:off 1:off 2:off 3:on 4:on 5:on 6:off
It also put a
nagios executable in
/usr/bin. Trying to run this without arguements produced the following:
[
show output] so we use the
- v option and provide the path to the config file
/etc/nagios/nagios.cfg to run the
preflight check.
[
show preflight1]. It is failing due to some errors in the config files so let's move on with installation before we try running it again.
Installing the Plugins
Install the
plugins. Plugins provide the core functionality of Nagios. Without any plugins defined Nagios is effectively useless.
I had some issues installing the plugins. I tried using an rpm and had a dependency issue:
[root@paulororke nagios]# rpm -ivf nagios-plugins-1.3.1-10.1.fc2.dag.i386.rpm
warning: nagios-plugins-1.3.1-10.1.fc2.dag.i386.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6
error: Failed dependencies:
perl(Net::SNMP) is needed by nagios-plugins-1.3.1-10.1.fc2.dag
Yet, according to
CPAN, perl(Net::SNMP) is installed:
[
show cpan output]. so I downloaded the source and tried building it myself: