View FAQ

[ Return To FAQ Index | Search The FAQs ]


FAQ Database : Nagios : Compiling

Title:Solaris 10 install
FAQ ID:F0447
Submitted By:Chris Cawley 
Last Updated:01/04/2010

Description:Installing under Solaris 10 

Solution:Get/add the following packages off sunfreeware: curl-7.19.7-sol10-sparc-local mysql-5.0.67-sol10-sparc-local db-4.7.25.NC-sol10-sparc-local expat-2.0.1-sol10-sparc-local fontconfig-2.4.2-sol10-sparc-local freetds-0.82-sol10-sparc-local freetype-2.3.9-sol10-sparc-local ncurses-5.6-sol10-sparc-local gcc-3.4.6-sol10-sparc-local openldap-2.4.16-sol10-sparc-local gd-2.0.35-sol10-sparc-local openssl-0.9.8l geoip-1.4.5-sol10-sparc-local httpd-2.2.14 perl-5.10.1 jpeg-7-sol10-sparc-local perl-ldap-0.39 libiconv-1.11-sol10-sparc-local perl-ldap-0.39.tar.gz libidn-1.14-sol10-sparc-local php-5.3.1 libintl-3.4.0-sol10-sparc-local libnet-1.1.2.1-sol10-sparc-local readline-5.2-sol10-sparc-local libpcap-1.0.0-sol10-sparc-local.gz sasl-2.1.21-sol10-sparc-local libpng-1.2.41-sol10-sparc-local webalizer-2.21.02-sol10-sparc-local libssh2-1.2.2-sol10-sparc-local xpm-3.4k-sol10-sparc-local libxml2-2.6.31-sol10-sparc-local zlib-1.2.3-sol10-sparc-local make-3.81-sol10-sparc-local Here is the "script" with some notes: ### Install Nagios PATH="$PATH:/usr/local/bin:/usr/local/php/bin" export PATH PATH="$PATH:/usr/local/sbin:/usr/ccs/bin:/usr/ucb:." export PATH LD_LIBRARY_PATH="/usr/local/lib:/lib:/usr/lib:/usr/local/ssl/lib" export LD_LIBRARY_PATH CC="/usr/local/bin/gcc" export CC ### Permanently set LD_LBRARY_PATH crle -l /lib:/usr/lib:/usr/local/lib:/usr/local/ssl/lib:/usr/local/nagios/lib ### Userid groupadd -g 10000 nagcmd useradd -u 10000 -g 10000 -d /export/home/nagios nagios mkdir -p /export/home/nagios chown nagios /export/home/nagios chgrp nagcmd /export/home/nagios ### Openssl cd /usr/local/source/openssl* make clean; make distclean; make realclean ./config shared make; make install ### Perl mv /usr/ucb/cc /usr/ucb/cc- cd /usr/ucb ln -s /usr/local/bin/gcc cc cd /usr/local/source/perl-5.10.1 ./Configure -de -Dcc=gcc make; make install cd /usr/bin mv -f perl perl- ln -s /usr/local/bin/perl ### Perl ldap cd /usr/local/source/perl-ldap-0.39 perl ./Makefile.PL ### Auto install prereq's off cpan make;make install ### Httpd cd /usr/local/source/httpd-2.2.14 ./configure --prefix=/usr/local/apache2 --enable-ssl --enable-so --with-ssl=/usr/local/ssl make; make install ### Php cd /usr/local/source/php-5.3.1 make clean; make distclean; make realclean ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-openssl=/usr/local/ssl --enable-libgcc --with-zlib=/usr/local --with-db4=/usr/local/BerkeleyDB.4.7 --with-mysql=/usr/local/mysql --without-pear make; make install ### Nagios ### You need to edit makefile ### -s,@SOCKETLIBS@,$SOCKETLIBS,;t t ### +s,@SOCKETLIBS@,-lnsl -lsocket,;t t cd /usr/local/source/nagios-3.2.0 ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagcmd --with-command-user=nagios --with-command-group=nagcmd make all; make install; make fullinstall make install-init; make install-commandmode; make install-config cd /usr/local/source/nagios-plugins-1.4.14 ./configure --prefix=/usr/local/nagios --enable-perl-modules --with-nagios-user=nagios --with-nagios-group=nagcmd cd /usr/local/apache2/bin ./htpasswd -c /usr/local/nagios/etc/htpasswd.users nagios ./htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin #Notes- # You HAVE TO EDIT the Makefile for the new version of openssl ### You have to add the follwing to httpd.conf # DirectoryIndex index.html index.php # AddHandler php5-script .php # AddType text/html .php # Include conf/extra/nagios.conf ### This assumes that you understand httpd.conf ### Basically, there are compile errors with the new version of openssl and also there were errors with installing and really turning on php  

Keywords:solaris 10 compile openssl php