OpenNMS on openSUSE 10.x

About OpenNMS

OpenNMS is the world's first enterprise-grade network management system developed under the open source model. As with any complex and powerful system, getting it installed and configured can take a little effort. It is the purpose of this document to explain what is required to get OpenNMS installed on openSUSE 10.1 or 10.2.

OpenSUSE 10.1 ships with Tomcat 5, which will not work with OpenNMS straighaway, before we perform a few tweaks. Tomcat 5 packages are not available on the CD/DVD media and needs to be downloaded from the following link:

tomcat5-5.0.30-27.noarch.rpm

tomcat5-webapps-5.0.30-27.noarch.rpm

tomcat5-admin-webapps-5.0.30-27.noarch.rpm

The above three packages also should be installed, using Right Click on RPM package and choosing install. If a few dependencies remains to be put in place, search the SUSE's CD/DVD first and then hit upon the download link (given above).

If the rpm is a downloaded one rather than picked up from SUSE's own media, do not use 'Install with Yast' option rather always work with Right Click -> Install.

Once the three Tomcat packages have been put in place, it's time to start installation of OpenNMS.

But just to test whether your Tomcat is up and running you can do a:

# /etc/init.d/tomcat5 start

Browse locally to http://localhost:8080

You should see the picture of Tomcat. If not, try to google and sort out this problem first.

Hoping you saw the tomcat pic earlier in your browser windows, we will proceed with the installation of: opennms-1.2.9-1_suse10.i586.rpm (RightClick on rpm file -> Install)

Note: We choose to use 'command line' for opennms-webapp, because of current inability of OpenNMS to talk to Tomcat 5 directly.

If you try to do the Right-Click on this rpm (opennms-webapp), you might be confronted with a message, 'There are no installable providers of Tomcat >= 4.1.18 for
opennms-webapp-1.2.9-1_suse10.i586 [Local packages]'

Now, it's time to tweak OpenNMS a bit to work with Tomcat 5.

Alt+F2 will open SuSe's text editor - Kate (You can use vi line editor too).

Browse to (/opt/OpenNMS/webapps/opennms.xml) and comment-out the "<Logger ... />" tag. The file should now look something like this: (Do a complete copy-paste of the proceeding lines, if you wish, overwriting all the contents of the opennms.xml).

Installing the PostgreSQL on SuSe 10.1

Once you have installed postgresql v 8.1 using YasT, it's time to configure this database settings.

Postgres configuration files: postgresql.conf and pg_hba.conf. These files are only created once Postgres has been started. Usually, startup scripts will be placed in /etc/init.d.

So, try to start and stop postgres server.

/etc/init.d/postgres start
/etc/init.d/postgres stop

Now, you will have to customise the postgresql.conf file.

This file controls some basic parameters of Postgres. We need to change two of these parameters.

Find the line in the file that contains max_connections. It needs to read:

max_connections = 256

Find the line that contains shared_buffers. It needs to read:

shared_buffers = 1024

Also, you'll need to made a few edits to the pg_hba.conf file.

The pg_hba.conf file controls which machines and users can access the database on a given machine via TCP/IP.

Since that is how OpenNMS accesses the database (via localhost) it is necessary to modify this file to allow OpenNMS to work. The easiest thing to do is to just allow anyone from the localhost to access the database.

You will need to again stop and restart Postgres after making these changes.

Configure Java for OpenNMS

OpenNMS needs to be configured to use an appropriate Java Runtime Environment (JRE). The OpenNMS tool runjava is used to set this up, and it can either search for a suitable JRE or you can tell it exactly which JRE to use. We will let it search by itself.

# /opt/OpenNMS/bin/runjava ?s

The output should resemble something like this:

runjava: Looking for an appropriate JRE...
runjava: Checking for an appropriate JRE in JAVA_HOME...
runjava: found: "/usr/lib/jvm/java/bin/java" is an appropriate JRE
runjava: value of "/usr/lib/jvm/java/bin/java" stored in configuration file