Solaris 10 OpenNMS Installation

OpenNMS is the world's first enterprise grade network management platform developed under the open source model.
It consists of a community supported open-source project as well as a commercial services, training and support organization.
This document outlines the steps required to build and install OpenNMS on Solaris 10 (B54).

Requirements

Install Solaris Express

The installation of Solaris 10 has been documented in many places so I will not be repeating it here.
I suggest you take a look at the Open Solaris website http://www.opensolaris.org for the most up to date documentation.
I installed the community release b54 but these steps should work on the production Solaris 10 release or official express.

Configure PostgreSQL

Give the posgres user a home directory.

# mkdir /export/home/postgres
# chown postgres /export/home/postgres
# usermod -d /export/home/postgres postgres

Set permissions on the PostgreSQL data directory.

# chown postgres /var/lib/pgsql/data 
# chmod 700 /var/lib/pgsql/data

Create and start the database.

# su - postgres
$ initdb -D /var/lib/pgsql/data
$ pg_ctl -D /var/lib/pgsql/data -l postmaster.log start
$ exit

Install pkg-get

As root

# /usr/sfw/bin/wget http://www.blastwave.org/pkg_get.pkg
# pkgadd -d pkg_get.pkg

Add /opt/csw/bin to root's PATH

# export PATH=$PATH:/opt/csw/bin

Install Subversion

# pkg-get install subversion

Install RRDTool

# pkg-get install rrdtool

Checkout the OpenNMS 1.3.2 code

# svn co https://opennms.svn.sourceforge.net/svnroot/opennms/opennms/tags/OPENNMS_1_3_2_RELEASE opennms

Building OpenNMS

# export JAVA_HOME=/usr/jdk/jdk1.5.0_10
# ./build.sh -Dbuild.postgresql.compiler.arg="-DHAVE_UNSETENV -DUNDEF_FILE_OFFSET_BITS" -Dopennms.home=/opt/OpenNMS install assembly:directory-inline

Go make a cup of coffee, this could take a while...
If everything went ok you'll see [INFO] BUILD SUCCESSFUL and can breath a sigh of relief.
If something goes wrong you need not worry though, my advice would be to log into IRC and take advantage of the excellent support at irc://irc.freenode.net/opennms - I did pre 1.3.2 release - thanks guys/gals!. :)

Installing OpenNMS

Copy compiled files into your preffered install location.

# cd target
# mv opennms-1.3.2 /opt/OpenNMS

Fix permissions.

# chmod +x /opt/OpenNMS/bin/*
# chmod +x /opt/OpenNMS/contrib/*
# chmod -x /opt/OpenNMS/contrib/*.README
# chmod -x /opt/OpenNMS/contrib/opennms.mib

Set the JVM

# /opt/OpenNMS/bin/runjava -s

Configure the database.

# ./install -discU

Start OpenNMS.

# ./opennms start

Setting up the OpenNMS webapp

Download and unpack Apache Tomcat 5.5.

# cd
# /usr/sfw/bin/wget http://mirror.inetc.co.uk/apache/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20.tar.gz
# /usr/sfw/bin/gtar -zxvf apache-tomcat-5.5.20.tar.gz
# mv apache-tomcat-5.5.20 /opt/tomcat
# /opt/OpenNMS/bin/install -y -w /opt/tomcat/conf/Catalina/localhost 

Start Tomcat and Log into your new OpenNMS server.

# cd /opt/tomcat/bin
# ./startup.sh

Open your browser and enter the address of your server as follows:

http://[servername]:8080/opennms

Log in using the following credentials:

  • Username: admin
  • Password: admin

Once logged in you can change your password by clicking Admin and selecting Configure Users, Groups and Roles -> Configure Users -> Modify.

Post Install Configuration

To really use OpenNMS you will want to modify a few files to let OpenNMS discover and monitor your network/s correctly.
Lets start with the discovery configuration, within this file you will find a default range of 192.168.0.1-254, change this to reflect your network (if you know what it is). OpenNMS uses this file to constantly check for any devices added to this network range/s.

# vi /opt/OpenNMS/etc/discovery-configuration.xml

Next you will want to configure the default SNMP version and community name. Don't worry too much if you do not have one yet, you can specify a per interface setting using the web interface.

# vi /opt/OpenNMS/etc/snmp-config.xml

Finally you we will want to be notified via e-mail to start with so you need to edit this file:

# vi /opt/OpenNMS/etc/javamail-configuration.properties

Uncomment and modify the following lines:

# The default setting is root@[127.0.0.1]
org.opennms.core.utils.fromAddress=opennms@wave2.org
# This property defines SMTP Host.
#
org.opennms.core.utils.mailHost=127.0.0.1
org.opennms.core.utils.mailer=smtpsend
org.opennms.core.utils.transport=smtp
# This property controls the use of the JMTA, the
# default is true
org.opennms.core.utils.useJMTA=false


CategoryTutorial