Installing OpenNMS on Fedora Core 2

OBSELENCE NOTE: This was written well over a year ago, so may be outdated (ie. may have broken links — if so, let me know and I’ll update).  Just because it’s old doesn’t mean that it’s not worth sharing!


A quick how-to on setting up OpenNMS (and some of the needed libraries) on Fedora Core 2.


For those who aren’t familiar with OpenNMS, it’s a program mean to aid in the monitoring of a network(s) (see for more info).

Originally, I tried installing OpenNMS on Red Hat 9, but had a lot of issues with older library packages.  Being faced with upgrading a *ton* of libraries, I ultimately decided to install Fedora Core 2 (FC2).


This how-to will assume the following:

  • Apache is installed
  • DB4 (Berkeley DB) is installed
  • Postgre SQL is installed
  • RPM management tools (the rpm program/script, etc)

When I installed FC2, I wasn’t low on space, so I pretty much told it to install most everything (not all packages from all four CDs — but the most common packages — the ones displayed in the package selection list).


Install Required Libraries

The following libraries need to be installed (to install, run: rpm -ivh <package name>):

  • net-snmp-5.1.1-2.i386.rpm (disc 1)
  • net-snmp-perl-5.1.1-2.i386.rpm (disc 3)
  • compat-libstdc++-7.3-2.96.126.i386.rpm (disc 3)
  • postgresql-jdbc-7.4.2-1.i386.rpm (disc 3)

All of the above libraries that have a (disc #) after them can be found directly on the FC2 CD specified.


Install J2SDK

To avoid plagarism and redundancy, see for where to get the correct J2SDK (along with how to use it).


Install Jakarta/Tomcat

Before you begin doing anything:

Step If this fails, try…
Check to make sure Apache is running

Make sure Apache is running:

[user@system src]# /etc/init.d/httpd status

If Apache is running, you’ll see:

httpd (pid # # # #) is running…
[user@system src]#

Otherwise you’ll see:

httpd is stopped…
[user@system src]#


If the httpd (Apache) service is running, go in a web browser to on the local machine, or go to http://<machine IP> from another machine’s web browser.   You should see the default Apache page.  If you get an error, something’s messed up.  Fix the problem with Apache before continuing!

Check to see if httpd is configured to start with the system


No automatic startup:

[user@system src]# chkconfig –list httpd
httpd     0:off 1:off 2:off 3:off 4:off 5:off 6:off

To correct this:

[user@system src]# chkconfig httpd on
[user@system src]#


With automatic startup:

[user@system src]# chkconfig –list httpd
httpd     0:off 1:off 2:on 3:on 4:on 5:on 6:off

Follow the instructions found at  I found that this is also a good place to place the CATALINA_HOME environment variable.  My /etc/profile.d/ file looks like the following:

[user@system src]# cat /etc/profile.d/
export JAVA_HOME="/usr/java/j2sdk1.4.0_02/"
export CATALINA_HOME="/var/tomcat4/"
declare -x JAVA_HOME="/usr/java/j2sdk1.4.0_02/"
declare -x CATALINA_HOME="/var/tomcat4/"
[user@system src]#

Note that as of now, there’s nothing in /var/tomcat4/, but we’re getting to that right now!  That’s where the Jakarta/Tomcat program goes — for now, save yourself a step later and put it in there.

Okay… moving on from the above stuff to check before installing Jakarta/Tomcat.  Go to -> Downloads (Binaries link) -> Scroll down in the long list until you reach Tomcat 4.1.30 -> Download jakarta-tomcat-4.1.30.tar.gz (I usually save stuff like this in /usr/src/ — I’m going to assume you’re doing the same).  Go to /usr/src (cd /usr/src).  Run tar -xzvf jakarta-tomcat-4.1.30.tar.gz.  After it finishes expanding the tar:

[user@system user]# cd /usr/src
[user@system src]# tar -xzvf jakarta-tomcat-4.1.30.tar.gz
[user@system src]# mv jakarta-tomcat-4.1.30/ /var/tomcat4/
[user@system src]#

Okay, now you’ve got Tomcat (Jakarta — I’m calling it Tomcat from now on) where the OpenNMS RPMs expect it.  Modify the /var/tomcat4/conf/tomcat-users.xml file to add another user with admin/manager privileges, similar to:
         <user username="admintest" password="test" roles="admin,manager"/>

Let’s startup Tomcat:

[user@system user]# $CATALINA_HOME/bin/
Using CATALINA_BASE:   /var/tomcat4
Using CATALINA_HOME:   /var/tomcat4
Using CATALINA_TMPDIR: /var/tomcat4/temp
Using JAVA_HOME:       /usr/java/j2sdk1.4.0_02
[user@system src]#

Go ahead and test it — go to (on the local machine) or <ip address>:8080 on a remote machine.  If you get the Jakarta/Tomcat welcome page, you’re good to go!  If not, go over the above steps again, search the net for the problem, etc.


Install OpenNMS

Go to -> Downloads (under Featured Links heading) -> download all three of the RPMs for Fedora Core 2 (once again to /usr/src/ ?):

  • opennms-1.1.3-2.fc2.i386.rpm
  • opennms-docs-1.1.3-2.fc2.i386.rpm
  • opennms-webapp-1.1.3-2.fc2.i386.rpm

Go to and get RRDtool (Download -> Stable Release -> scroll down until you find the right RPM):

  • rrdtool-1.0.41-1.8.0.i386.rpm

Now install RRDtool:

[user@system user]# rpm -ivh rrdtool-1.0.41-1.8.0.i386.rpm
<a bunch of stuff will be shown here>
[user@system src]#

Note that if any errors are generated, you need to get them fixed (mainly missing dependecies) before continuing — if you get errors — fix them then retry this step.

Now install OpenNMS:

[user@system user]# rpm -ivh open*.rpm
<a bunch of stuff will be shown here>
[user@system src]#

Note that on my system, even though I had the necessary dependencies (modules) installed, I was still getting "missing package" errors.  To avoid that, I used the following command to install OpenNMS:

[user@system user]# rpm -ivh –force –nodeps open*.rpm
<a bunch of stuff will be shown here>
[user@system src]#



Before starting the service, you need to customize the IP range(s) that the discovery service will search/monitor.  Modify the file /opt/OpenNMS/etc/discovery-configuration.xml to include the IP range(s) that you want OpenNMS to monitor.  Refer to the HTML page at /opt/OpenNMS/docs/quick/book.html for more information on customizing this and other options.

At this point, if the above step didn’t generate any errors, you’re ready to start the OpenNMS service.  To do this:

[user@system user]# /etc/init.d/opennms start
Starting OpenNMS:                      [  OK  ]
[user@system src]#

If you have an error above (it would say FAILED instead of OK), look at the logs found in /var/log/opennms/ to try and see what’s causing the problem.

If the above started without an error, before accessing OpenNMS, make sure that all (or most of) the services are started:

[user@system user]# /etc/init.d/opennms status
OpenNMS.Eventd          : running
OpenNMS.Trapd           : running
OpenNMS.Dhcpd           : starting
OpenNMS.Actiond         : running
<blah, blah, blah — more services listed>
[user@system src]#

If the the services are good to go, in your web browser, go to (local machine) or <ip address>:8080/opennms (remote machine).  The default login is admin/admin.  From there you can create new user accounts, etc.

That’s it!


Handy Directories to Know About

/var/lib/pgsql/ = Postgre SQL directory
/var/log/opennms/ = OpenNMS log directory
/usr/java/j2sdk-??? = Java SDK directory
/opt/OpenNMS/ = OpenNMS directory
/opt/OpenNMS/docs/ = OpenNMS documentation directory (HTML format)
/var/tomcat4/ = directory that OpenNMS RPMs looks for Jakarta/Tomcat in (during the setup, modifying the server.xml file)



Do you have some comments (errors, omissions, etc) about this brief (and somewhat disorderly) how-to?  Let me know!

Related posts:

  1. Linux Command Reference Here’s a Linux Command Reference that I created a couple...

Related posts brought to you by Yet Another Related Posts Plugin.

Leave a Reply