For When You Can't Have The Real Thing
[ start | index | login ]
start > Nagios > Solaris Build

Solaris Build

Created by dave. Last edited by dave, 16 years and 176 days ago. Viewed 10,328 times. #2
[diff] [history] [edit] [rdf]


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 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

The LD_OPTIONS 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/
inet_addr                           check_icmp.o  (symbol belongs to implicit dependency /usr/lib/
gethostbyname                       check_icmp.o  (symbol belongs to implicit dependency /usr/lib/
ld: fatal: Symbol referencing errors. No output written to check_icmp
collect2: ld returned 1 exit status
make[2]: *** [check_icmp] Error 1
# cd plugins
# gcc -O2 check_icmp.c -o check_icmp -lnsl -lsocket
# cd ..
# make
Note that you probably still have to chown check_icmp to root:bin and chmod it 4555 in order for it to work properly.
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt