Installing on Solaris

From OpenNMS

  • Description of installation on SunOS 5.9 (Solaris 9) on 64bit sparc system

Contents

Prerequisites

general utilities

  • tested with gcc 3.4.6 installed in /usr/local
  • check your PATH - variable to contain
 /usr/local/bin for gcc
 /usr/ccs/bin for make
  • CAUTION: To avoid confusion with library paths etc. try to get the newest versions of all needed tools from http://www.sunfreeware.com. Almost all newer tools will install to /usr/local. Almost all problems described below were due to the mix of older and newer tools/librarys and vanished after updating those tools. If you already have older versions of the tools installed they may have been installed to different paths:
 /opt/sfw
 /opt/csw
 /usr/sfw
 /usr/local
  • check carefully messages from .configure to see if you included the appropriate paths and library paths! If some libraries are "elsewhere" you might try
 LD_LIBRARY_PATH=elswhere
 export LD_LIBRARY_PATH
  • download and unzip following tools from sun freeware:
 gcc
 java
 libiconv
 tar
 gzip
 bash
 libintl
 perl
 db
 readline
 zlib
 render
 xrender
 expat
 xft
 libpng
 libart_lgpl
 fontconfig
 freetype
  • install them with the following command for all downloaded files
 gunzip filename
 pkgadd -d filename

jicmp

  • download sources according to description in Jicmpto your installation-directory
  • cd to your installation-directory
  • run
./configure
./make
./make install
  • Libraries will be installed in /usr/local/lib
  • Program will be installed as /usr/local/share/java/jicmp.jar
  • if you get following error during make
In file included from /usr/include/string.h:18,
                from IcmpSocket.h:60,
                from IcmpSocket.c:55:
/usr/include/iso/string_iso.h:60: warning: conflicting types for built-in function `memcmp'
/usr/include/iso/string_iso.h:61: warning: conflicting types for built-in function `memcpy'
/usr/include/iso/string_iso.h:65: warning: conflicting types for built-in function `strcmp'
/usr/include/iso/string_iso.h:66: warning: conflicting types for built-in function `strcpy'
*** Error code 1
make: Fatal error: Command failed for target `IcmpSocket.lo'
Current working directory /usr/local/src/jicmp-1.0.7
*** Error code 1
make: Fatal error: Command failed for target `all'

try

CFLAGS=-fno-builtin ./configure
make
  • if you get errors during make like
In file included from IcmpSocket.c:56:
IcmpSocket.h:137:3: #error "not sure how to get an IP header struct on 
this platform!"
IcmpSocket.h:145:3: #error "not sure how to get an ICMP header struct on 
this platform!"

try

CFLAGS="-DHAVE_NETINET_IP_H -DHAVE_NETINET_IP_ICMP_H" ./configure
make

rrd

  • download rrd (and any required prerequisites) from http://www.sunfreeware.com to your installation-directory
  • cd to your installation-directory
  • REMARK: the compiled package didn't work for this configuration so rrd source code was installed, see below.
  • Installation of compiled package:
  • run
 gunzip filename.gz
 pkgadd -d filename
  • example: rrdtool-1.2.19-sol9-sparc-local.gz will install to /usr/local/rrdtool-1.2.19
  • this package didn't work together with jrrd, following error was generated when running configure for jrrd:
 checking for library containing rrd_create... no
 configure: error: cannot find rrd library with LDFLAGS = " -L/usr/local/rrdtool-1.2.19/lib"

Installation from source code:

  • download rrd source code(and any required prerequisites) from http://www.sunfreeware.com to your installation-directory
  • cd to your installation-directory
  • look where other prerequisited open source tools (like libfreetype) are installed in your system and change the path in the example below, here /usr/sfw was used
  • run
 LDFLAGS=-L/usr/sfw/lib CPPFLAGS=-I/usr/sfw/include ./configure
 make
  • if the make - job stops working with
 Making all in examples
 sed 's,@'exec_prefix@,/usr/local/rrdtool-1.2.19,' > cgi-demo.cgi

as last lines in output press CTRL-D (the job obviously tries to read from command line). cgi-demo will be empty...

 make install
  • example: rrdtool-1.2.19-sol9-sparc-local.gz will install to /usr/local/rrdtool-1.2.19

jRRD

  • download jrrd-1.0.1.tar.gz from http://sourceforge.net/project/showfiles.php?group_id=4141 to your installation-directory
  • cd to your installation-directory
  • replace the path to the rrdtool in the example below with the path to your rrdtool installation
  • replace the path to the java-jdk in the example below with the path to your java installation
  • run
gunzip -c jrrd-1.0.1.tar.gz | tar -xcf -
cd jrrd-1.0.1
./configure --with-rrd=/usr/local/rrdtool-1.2.19 --with-java=/usr/jdk/jdk1.5.0_15
make
make install
  • Libraries will be installed in /usr/local/lib
  • Program will be installed as /usr/local/share/java/jrrd.jar

PostgrSQL

 WARNING: at the moment (04/15/2008) postgresql-8.3.0 is available for download, but ist only supported in the latest nightly snapshots for opennms 1.6 (see bug http://bugzilla.opennms.org/show_bug.cgi?id=2277). So you may have to look for another way to get postgres 8.2
  • cd to your installation-directory
  • run
 gunzip postgresql-8.3.0-sol9-sparc-local.gz
 pkgadd -d postgresql-8.3.0-sol9-sparc-local
  • postgres should now be installed in /usr/local/pgsql
  • create start script /etc/init.d/postgres for start/stop of database
  • create link Snnpostgresql in /etc/rc3.d
  • make data directory according to your design
 mkdir /usr/local/pgsql/pgdata
 chown postgres /usr/local/pgsql/pgdata
  • initialize a new DB (target directory has to be empty!)
 /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/pgdata
  • if you have problems starting postgres or any of it's tools with following error message:
 pg_ctl
 ld.so.1: pg_ctl: fatal: libgcc_s.so.1: open failed: No such file or directory
 Killed

then look for the path to this library libgcc_s.so.1 (comes with gcc compiler) and add the environment-variable (adjust the path to your needs)

 LD_LIBRARY_PATH=/usr/local/lib
 export LD_LIBRARY_PATH
  • read /documentation/InstallUnStable for configuring security etc.. The configuration files mentioned there should be in your data directory /usr/local/pgsql/pgdata after initializing the database with initdb as described above.

iplike

  • download iplike solaris package following the links for downloading opennms in Main_Pageto your installation-directory
  • cd to your installation-directory
  • run
 gunzip iplike-1.0.6-sol9-sparc-local.gz
 pkgadd -d iplike-1.0.6-sol9-sparc-local
  • iplike should now be installed in /usr/local/lib

opennms

  • download opennms[-snapshot]-version.tar.gz to your installation-directory
  • cd to your opennms installation-directory (probably /opt/opennms, used below in the examples)
  • run
 /usr/local/bin/gunzip -c installation-directory/opennms[-snapshot]-version.tar.gz \
                          >opennms[-snapshot]-version.tar
 tar -xf opennms[-snapshot]-version.tar
  • if your /usr/local/bin/gunzip complains
 /usr/local/bin/gunzip: not found

then you probably have no /usr/local/bin/bash. Edit /usr/local/bin/gunzip and change the path in the first line to your bash or ksh like

 #!/usr/bin/ksh
  • Be careful with gzipp'ed tar-Files from opennms on Solaris: use Gnu-gunzip to unpack. If not you may get errors like
tar: A lone zero block at 364941

On Solaris 10 if you receive the following error message when unpacking with tar:

tar: directory checksum error

Make sure you have the GNU tar package installed (SUNWgtar or a version from sunfreeware), and unpack with:

gtar xvf opennms[-snapshot]-version.tar

This may work or may not, it is difficult to determine wether all files are installed correctly or not.

Workaround if you have another system with gnu-tar (most or all linux systems): unpack the archive there and pack it again with

tar --format=ustar -cf filename *

If you still have problems try the following

 cd temp_install_dir
 cp download_dir/opennms*rpm .
 rpm2cpio opennms-1.3.7-1.noarch.rpm | cpio -dim
 rpm2cpio opennms-core-1.3.7-1.noarch.rpm | cpio -dim
 rpm2cpio opennms-docs-1.3.7-1.noarch.rpm | cpio -dim
 rpm2cpio opennms-webapp-jetty-1.3.7-1.noarch.rpm | cpio -dim
 
 # you will get opt etc usr and var dirs, move them appropriately:
 mv etc/profile.d /etc
 mv var/log/opennms/ /var/log
 mv var/opennms/ /var
 mv opt/opennms/* /opt/opennms
 mv usr/share/doc/opennms-1.3.7/ /usr/share/doc/
 
 cd /opt/opennms
 chmod +x bin/*
 chmod +x contrib/*
 chmod -x contrib/*.README
 chmod -x contrib/opennms.mib
  • run
 /opt/opennms/bin/runjava

when this documentation was written java was not found correctly as it was installed (from the sun freeware packet) in /usr/jdk/jdk1.5.0_15 so

 /opt/opennms/bin/runjava -S /usr/jdk/jdk1.5.0_15/bin/java

did the job

  • run
 /opt/opennms/bin/install -dis

to initialize the database.

  • now you should be able to start opennms
 /opt/opennms/bin/opennms start
Personal tools
DevJam 2008 Sponsors
DevJam 2008 Sponsor: Google
DevJam 2008 Sponsor: Netregistry
DevJam 2008 Sponsor: Papa John's
NewEdge Networks
OpenNMS takes home the gold award!
Join the Free Software Foundation
Support This Project Commercial OpenNMS Support OpenNMS Italia Get OpenNMS at SourceForge.net. Fast, secure and Free Open Source software downloads Our Network Simulator Our Java Profiler