Building Nagios on Solaris 8 Dependancies (already installed): http://nagios.sourceforge.net/docs/1_0/about.html#requirements Tools: gcc 2.95.3 (precompiled from Sunfreeware.com) GNU Make 3.80 GNU binutils 2.13.1 PHP 4.3.3 (refer to building PHP on Solaris 8) MySQL 4.0.14 (refer to building PHP on Solaris 8) # mkdir /build (if not already created) Setup our environment: # LD_LIBRARY_PATH=/ur/local/lib:/usr/local/ssl/lib:/usr/lib:/usr/openwin/lib:/usr/ccs/lib:/usr/ucblib:/usr/openwin/lib/libp; export LD_LIBRARY_PATH First a couple of prequesites: You will need an entropy device for key seeding. In Solaris 8 and above we use /dev/random. In Solaris 8 it is installed by Sun patch 112438-01. In Solaris 2.5 through Solaris 7 we use prgnd: http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html Compile OpenSSL first. However before we compile OpenSSL it requires an open source compression library called zLib. zLib can be downloaded from www.zlib.org http://aleron.dl.sourceforge.net/sourceforge/libpng/zlib-1.1.4.tar.gz Make sure you use a minimum version of 1.1.4 due to an exploit. Building zlib: # cd /build/zlib-1.1.4 # cp Makefile Makefile.orig Edit Makefile that comes with zlib and change the line: CC=cc to CC=gcc # make # make install Compile OpenSSL. Download http://www.openssl.org/source/openssl-0.9.7b.tar.gz and save it into /build/openssl-0.9.7b.tar.gz uncompress and untar # cd /build/openssl-0.9.7b # ./config --prefix=/usr/local --openssldir=/usr/local/openssl shared # make # make test # make install # openssl version OpenSSL 0.9.7b 10 Apr 2003 Now build Gnu M4 Download from ftp://ftp.gnu.org/pub/gnu/m4/m4-1.4.tar.gz # cd /build/m4-1.4 # ./configure --prefix=/usr/local # make # make install Build Bison Download http://ftp.gnu.org/gnu/bison/bison-1.875.tar.gz # cd /build/bison-1.875 # ./configure --prefix=/usr/local # make # make install Build Flex Download from ftp://ftp.cise.ufl.edu/pub/mirrors/GNU/non-gnu/flex/flex-2.5.4a.tar.gz # cd /build/flex-2.5.4 # ./configure --prefix=/usr/local # make # make test Check successful, using COMPRESSION="" # make install Build libpng http://www.libpng.org/pub/png/ Download from http://www.libpng.org/pub/png/libpng.html or http://sourceforge.net/projects/libpng/ # cd /build/libpng-1.2.5 # cp scripts/makefile.solaris Makefile # make # make test libpng passes tes # make install Build libjpeg: Download from ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz # cd /build/jpeg-6b # ./configure --prefix=/usr/local # make # make test # make install # cp /build/jpeg-6b/libjpeg.a /usr/local/lib/libjpeg.a # cp /build/jpeg-6b/*.h /usr/local/include/. # chmod +x /usr/lib/libjpeg.a Build GD Library Download http://www.boutell.com/gd/http/gd-2.0.15.tar.gz # cd /build/gd-2.0.15 # ./configure --prefix=/usr/local # make # make install Build libxml: http://www.xmlsoft.org/ Download from ftp://xmlsoft.org/libxml2-2.5.10.tar.gz # cd /build/libxml2-2.5.10 # ./configure --prefix=/usr/local # make # make install Build libxslt: Download from ftp://xmlsoft.org/libxslt-1.0.32.tar.gz # cd /build/libxslt-1.0.32 # ./configure --prefix=/usr/local # make # make install Build CrackLib: Download http://www.crypticide.org/users/alecm/security/cracklib,2.7.tar.gz # cd /build # mv "cracklib,2.7" cracklib2.7 # cd /build/cracklib2.7 # CC=gcc; export CC Edit util/Makefile and replace all "cc $(CFLAGS) -o" with "gcc $(CFLAGS) -o" # make all # make install # cp /build/cracklib2.7/cracklib/libcrack.a /usr/local/lib/libcrack.a # chmod +x /usr/local/lib/libcrack.a Build Curl (needs 7.9.8 or better): Notes: http://curl.haxx.se/mail/archive-2000-05/0002.html http://groups.google.com/groups?hl=en&lr=lang_en|lang_iw|lang_es&ie=UTF-8&newwindow=1&safe=off&threadm=3C33A3E9.1D6EAD40%40sonic.net&rnum=2&prev=/groups%3Fhl%3Den%26lr%3Dlang_en%257Clang_iw%257Clang_es%26ie%3DISO-8859-1%26newwindow%3D1%26safe%3Doff%26q%3Dcurl%253A%2B(35)%2BSSL%253A%2Berror%253A140770FC%253ASSL%2Broutines%253ASSL23_GET_SERVER_HELLO%253Aunknown%2Bprotocol%26sa%3DN%26tab%3Dwg Download http://curl.haxx.se/download/curl-7.10.5.tar.gz # cd /build/curl-7.10.5 # CFLAGS='-O2 -I/build/openssl-0.9.7b/include -DEAPI'; export CFLAGS # LDFLAGS="-L/build/openssl-0.9.7b"; export LDFLAGS # SSL_BASE=/build/openssl-0.9.7b; export SSL_BASE # ./configure --prefix=/usr/local # make # make test # make install Build mcrypt, libmcrypt and libmhash: Mhash can be found at http://mhash.sourceforge.net/ or http://unc.dl.sourceforge.net/sourceforge/mhash/mhash-0.8.18.tar.gz Download from ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz Download from ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/mcrypt-2.6.4.tar.gz # cd /build/mhash-0.8.18 # ./configure --prefix=/usr/local # make install Notes: http://lists.hellug.gr/pipermail/mcrypt-dev/2003/000405.html "Replace mcrypt_symb.c in src/ with the original file from the distribution. For some reason the makefile decided to overwrite it." # cd /build/libmcrypt-2.5.7 # ./configure --prefix=/usr/local # cp lib/mcrypt_symb.c src/mcrypt_symb.c # make # make install # cd /build/mcrypt-2.6.4 # ./configure --prefix=/usr/local # make # make install Build MySql (needed for GEDi): Download from http://www.mysql.com/downloads/mysql-4.0.html ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-4.0/mysql-4.0.14.tar.gz # cd /build/mysql-4.0.14 # ./configure --prefix=/usr/local/mysql # make # make test # make install rpm -q php-mysql Download php from http://www.php.net/downloads.php # cd /build/php-4.3.3 # CFLAGS='-O2 -I/build/openssl-0.9.7b/include -DEAPI'; export CFLAGS # LDFLAGS="-L/build/openssl-0.9.7b"; export LDFLAGS # ./configure --prefix=/usr/local \ --with-apxs2=/usr/local/httpd/bin/apxs \ --with-config-file-path=/etc --enable-track-vars \ --without-bz2 --with-crack=/build/cracklib2.7 \ --with-curl=/build/curl-7.10.5 --with-cyrus=/build/cyrus-imapd-2.1.13 \ --without-fbsql --without-fdftk --without-fribidi --with-jpeg-dir=/build/jpeg-6b \ --with-png-dir=/build/libpng-1.2.5rc2 --without-hwapi --without-imap \ --without-informix --without-ingres --without-ircg --without-java --without-mcal \ --without-mcrypt --without-mcve --without-ming --without-mnogosearch --without-msession \ --without-ncurses --without-oracle --without-oci8 --without-ovrimos --disable-pcntl \ --without-cpdflib --without-pdflib --without-pfpro --without-pgsql --without-pspell \ --without-qtdom --without-readline --without-libedit --without-recode --without-swf \ --without-sybase --without-sybase-ct --without-xslt-sablot --without-sablot-js \ --without-expat-dir --disable-xslt --without-yaz --disable-yp --without-zip \ --with-mysql=/usr/local/mysql \ --with-xml --with-dom --with-domxml --with-zlib # make # make test # make install # cp cp php.ini-recommended /usr/local/etc/php.ini (this is new in PHP 4) # php -v PHP 4.3.3 (cli) (built: Aug 25 2003 13:06:54) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies Build Apache # cd /build/httpd-2.0.47 # export SSL_BASE=/usr/local/openssl # ./configure --prefix=/usr/local/httpd \ --with-ssl=/usr/local/openssl \ --enable-so \ --enable-mods-shared=all \ --enable-access=shared --enable-auth=shared --enable-auth_anon=shared \ --enable-auth_dbm=shared --enable-auth_digest=shared --enable-include=shared \ --enable-log_config=shared --enable-env=shared --enable-mime_magic=shared \ --enable-cern_meta=shared --enable-expires=shared --enable-headers=shared \ --enable-usertrack=shared --enable-unique_id=shared --enable-setenvif=shared \ --enable-mime=shared --enable-status=shared \ --enable-autoindex=shared --enable-asis=shared --enable-info=shared \ --enable-cgi=shared --enable-dav_fs=shared --enable-vhost_alias=shared \ --enable-negotiation=shared --enable-dir=shared \ --enable-actions=shared --enable-speling=shared --enable-userdir=shared \ --enable-alias=shared --enable-rewrite=shared --enable-proxy=shared \ --enable-proxy_ftp=shared --enable-proxy_http=shared \ --enable-proxy_connect=shared --enable-rule=SHARED_CORE \ --verbose # make # make install Prepare Apache for Nagios Notes: http://nagios.sourceforge.net/docs/1_0/installweb.html Modify /usr/local/httpd/conf/httpd.conf with the following: User nagios Group nagios --- ServerAdmin whs@ws.harcourt.com --- ServerName monitor.harcourt.com:80 --- At the bottom under the Virtual Host section: # # Nagios # ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/ AllowOverride AuthConfig Options ExecCGI Order allow,deny Allow from all # # # Alias /nagios/ /usr/local/nagios/share/ Options None AllowOverride AuthConfig Order allow,deny Allow from all Build php: Build MySQL: Build Nagios Notes: http://nagios.sourceforge.net/docs/1_0/installing.html Download from http://www.nagios.org/download/ # groupadd -g 5301 nagios # useradd -d /usr/local/nagios -g nagios -s /bin/ksh -m nagios # mkdir -p /usr/local/nagios # chown nagios:nagios /usr/local/nagios # cd /build/nagios-1.1 # ./configure --prefix=/usr/local/nagios --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-grp=nagios --with-gd-lib=/usr/local/lib --with-gd-inc=/usr/local/include *** Configuration summary for nagios 1.1 06-02-2003 ***: General Options: ------------------------- Nagios executable: nagios Nagios user/group: nagios,nagios Command user/group: nagios,nagios Embedded Perl: no Install ${prefix}: /usr/local/nagios Lock file: ${prefix}/var/nagios.lock Init directory: /etc/init.d Web Interface Options: ------------------------ HTML URL: http://localhost/nagios/ CGI URL: http://localhost/nagios/cgi-bin/ Traceroute (used by WAP): /usr/sbin/traceroute External Data Routines: ------------------------ Status data: Default (text file) Object data: Template-based (text file) Comment data: Default (text file) Downtime data: Default (text file) Retention data: Default (text file) Peformance data: Default (external commands) Extended info data: Template-based (text file) Review the options above for accuracy. If they look okay, type 'make all' to compile the main program and CGIs. # make all # make install # make install-config # make install-commandmode # make install-init # ln -s /etc/init.d/nagios /etc/rc3.d/S99nagios Build the plugins: Download from http://nagiosplug.sourceforge.net/ # cd /build/nagios-plugins-1.3.1 # ./configure --prefix=/usr/local/nagios --with-cgiurl=/nagios/cgi-bin --with-nagios-user=nagios --with-nagios-grp=nagios --with-openssl=/usr/local/openssl # make # make test # make install Build NAGAT: Download from http://sourceforge.net/projects/nagat # cd /build/nagat-1.0a2 Install icons: Download from http://prdownloads.sourceforge.net/nagios/imagepak-base.tar.gz Download from http://prdownloads.sourceforge.net/nagios/imagepak-andrade.tar.gz Download from http://prdownloads.sourceforge.net/nagios/imagepak-bernhard.tar.gz Download from http://prdownloads.sourceforge.net/nagios/imagepak-remus.tar.gz