[Nagios-devel] Solaris Nagios packages

lists lists at catsnest.co.uk
Wed May 20 14:43:15 UTC 2009


Hi Dev's,

Not sure if any one does this still but...

I was making a Solaris Nagios package and have edited the Nagios
Makefile.in as below.

I did'nt use  the 'mkpackage' script but id suggest using gmake instead of make.







==Building Nagios pakage On Solaris Sparc==





===Prepare===



====Install gcc====





get the gcc package form sunfreeware



 # wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/gcc-3.4.6-sol10-sparc-local.gz



 # gunzip gcc-3.4.6-sol10-sparc-local.gz



 # pkgadd -d gcc-3.4.6-sol10-sparc-local



you then need to set up the environment (you can add this to
/etc/profile or some enlivenment  =)



 # export CC ; CC=gcc



 # export LD_LIBRARY_PATH;  LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/ssl/lib



 # export PATH ;
PATH=/usr/local/bin:/usr/sfw/bin:/usr/sbin:/usr/bin:/usr/ccs/bin



=====install ligiconv=====



gcc needs libiconv



wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/libiconv-1.11-sol10-sparc-local.gz

 # gunzip libiconv-1.11-sol10-sparc-local.gz

 # pkgadd -d libiconv-1.11-sol10-sparc-local







====Install Lib gd====



Get the source form www.libgd.org



 # wget http://www.libgd.org/releases/gd-2.0.35.tar.gz



 # gunzip -dc gd-2.0.35.tar.gz | tar -xf -



 # cd gd-2.0.35



 # ./configure --prefix=/opt/libgd

 ...

 # make

 ...

 # make install

 ...



===Build Nagios server===



get the nagios source from www.nagios.org



 # gunzip -dc nagios-3.0.6.tar.gz | tar -xf -



 # cd nagios-3.0.6



copy in the 'moded Makefile.in' and checkinstall.in



 # cp /root/Makefile.in.nagios.moded Makefile.in



 # ./configure --prefix=/opt/nagios-3.0.6 --with-nagios-user=nagios
--with-nagios-group=nagios --with-gd-lib=/opt/libgd/lib
--with-gd-inc=/opt/libgd/include



 # gmake pkgclean

 # gmake all

 # gmake pkgset













Diff Makefile.in =======================================================

284a285,286

> SUN_OS_RELEASE=$(shell uname -r | cut -f2 -d. )

> SUN_PLATFORM=$(shell uname -p)

301a304

>       if [ -f checkinstall.in ] ; then cat checkinstall.in | sed 's/!SUN_PLATFORM!/$(SUN_PLATFORM)/g' >checkinstall; fi

311,312c314,315

< nagios.SPARC.pkg.tar.gz: pkg/nagios/pkgmap

<       cd $(PACKDIR) && tar -cf - nagios | gzip -9 -c >
../nagios.SPARC.pkg.tar.gz

---

> nagios.sun.pkg.tar.gz: pkg/nagios/pkgmap

>       cd $(PACKDIR) && tar -cf - nagios | gzip -9 -c > ../nagios-$(VERSION)-Sol$(SUN_OS_RELEASE)-$(SUN_PLATFORM).pkg.tar.gz

314c317,318

< pkgset: nagios.SPARC.pkg.tar.gz

---

> nagios.sun.pkg: pkg/nagios/pkgmap

>       pkgtrans -s $(PACKDIR) ../nagios-$(VERSION)-Sol$(SUN_OS_RELEASE)-$(SUN_PLATFORM).pkg nagios

315a320,323

> pkgsettar: nagios.sun.pkg.tar.gz

>

> pkgset: nagios.sun.pkg

>

317c325

<       rm -rf pkg Prototype nagios.SPARC.pkg.tar.gz

---

>       rm -rf pkg Prototype nagios-$(VERSION)-$(SUN_PLATFORM).pkg.tar.gz

========================================================================



checkinstall.in ========================================================

#!/bin/sh



#



expected_platform="!SUN_PLATFORM!"



#



platform=`uname -p`



#



if [ ${platform} != ${expected_platform} ]; then



   echo "\n\n\n\tThis package must be installed on a
${expected_platform} architecture\n"



   echo "\tAborting installation.\n\n\n"



   exit 1



fi



exit 0

========================================================================





--
--
Fnord...
<-- http://23.me.uk --> <-- http://wiki.s23.org -->
<- -
Mojo Jojo: Excuse me sir, but can you direct me to the location of
where I can locate some eggs for I would like to purchase them so that
I can take them home with me and I can eat them today.
[pause]
Mojo Jojo: And maybe tomorrow.. ->




More information about the Nagios-devel mailing list