I'd be remiss if I did not recommend you skip all the below nonsense and merely use blastwave
to install nagios, it's plugins, and all the required dependancies.
Building Nagios on Solaris
These notes are relevant for building Nagios 1.2 (and plugin 1.4 friends) on Solaris 9.
There is a whole whack of prerequisites you have to deal with; see the documentation for details. Most of them can be satisfied by downloading and installing the appropriate packages (and dependancies) from sunfreeware.com. The ugliest of them is the gd
library, which has a large number of dependancies itself, but since this is required to draw the pretty maps everyone likes to look at, you will eventually have to go down this path.
Configure options for nagios:
# export LD_OPTIONS="-R/usr/local/lib -R/opt/sfw/gcc-3/lib/sparcv9"
# ./configure --prefix=/opt/nagios --with-gd-lib=/usr/local/lib --with-gd-inc=/usr/local/include
# make ; make install
are required so that the cgi process can find the gd and gcc libraries without having its own running environment diddled with. The --with-gd-lib=
etc are required because for some reason the configure script does not recognize them on its own.
Configure options for nagios plugins:
# ./configure --prefix=/opt/nagios
You will have a problem with check_icmp:
gcc -g -O2 -L. -o check_icmp check_icmp.o ../intl/libintl.a -lgen -lsocket
Undefined first referenced
symbol in file
inet_ntoa check_icmp.o (symbol belongs to implicit dependency /usr/lib/libnsl.so.1)
inet_addr check_icmp.o (symbol belongs to implicit dependency /usr/lib/libnsl.so.1)
gethostbyname check_icmp.o (symbol belongs to implicit dependency /usr/lib/libnsl.so.1)
ld: fatal: Symbol referencing errors. No output written to check_icmp
collect2: ld returned 1 exit status
make: *** [check_icmp] Error 1
# cd plugins
# gcc -O2 check_icmp.c -o check_icmp -lnsl -lsocket
# cd ..
Note that you probably still have to chown check_icmp
and chmod it 4555 in order for it to work properly.