From OpenNMS
- Description of installation on SunOS 5.9 (Solaris 9) on 64bit sparc system.
- Solaris 10 user can use the pre-installed Postgres database. (see [1])
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
- read Performance_tuning#PostgreSQL_8.1before installation so you can design your configuration
- download postgres packages from http://www.sunfreeware.com to your installation-directory. Postgres postgresql-8.3.0-sol9-sparc-local.gz is used in this example.
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.zip to a temporarily directory.
- after download cd to this temporarily directory.
- run
/usr/bin/unzip temp-directory/opennms[-snapshot]-version.zip
- this will create a new directory "opennms-installer"
login to your Solaris desktop environment or export your DISPLAY to a computer, this is needed because the installer now has a GUI.
- open a commandprompt/terminalwindow
- run
temp-directory/opennms-installer/java -jar standalone-opennms-installer-*version*-*date*.jar
to start setup. (make sure you know your postgres passwords)
- follow the directives in the installer, install OpenNMS on a slice where you have and will have enough room. /opt/OpenNMS is prefered.
- now you should be able to start opennms
/opt/OpenNMS/bin/opennms start
- (you can get great benefit from starting OpenNMS with LD_PRELOAD_64=libumem.so ./bin/opennms start
Performance tips
- Start OpenNMS with the following command: LD_PRELOAD_64=libumem.so ./bin/opennms start, this will preload the 64 bit environment.
- if you installed OpenNMS on a slice like /opt you can have great benefits from altering the read/write buffering on this slice. Open /etc/vfstab and modify the slice accordingly: [example]
/dev/dsk/c1d0s5 /dev/rdsk/c1d0s5 /opt ufs 2 yes noatime,forcedirectio.
The settings noatime and forcedirectio will reduce the waitingtime for rrd to write his files. In my case the diskusage dropped from a steady 100% to 10% after setting these options on /opt and rebooting the system.






