Install OpenNMS - One Place to Monitor All Network Devices On Ubuntu

Hi everyone, this tutorial is all about how to setup OpenNMS on Ubuntu Server. Here, we will be running Ubuntu Server 14.04 LTS "Trusty". This tutorial also works for the older version of Ubuntu like 13.10, 13.04, 12.10) and also for its derivatives Linux Mint, etc

OpenNMS is an award winning network management application platform with a long track record of providing solutions for enterprises and carriers. It is  a free, Open Source, and world’s first enterprise grade network monitoring system that can be used to monitor tens of thousands of unlimited devices with a single instance. OpenNMS will discover and monitor the services or nodes automatically in your network, or you can assign a particular service to monitor by OpenNMS.

So, here are the steps below on how to install OpenNMS in our Ubuntu Server. You can connect to your Ubuntu Server via SSH remote access if you don't have control over the Server physically.

1. Updating the Repository Index

To update the package list in our machine's repo index with opennms, we'll need to add the repo url lines inside a file called“opennms.list” within the “/etc/apt/sources.list.d” directory. To do this, we'll want to enter the following commands in a shell or terminal.

$ sudo cat << EOF | sudo tee /etc/apt/sources.list.d/opennms.list
deb stable main
deb-src stable main

Then, we need to add OpenNMS key.

$ wget -O - | sudo apt-key add -

Now, lets update our package index of OpenNMS .

$ sudo apt-get update

updating repository index

2. Configuring the Database

Installing PostgreSQL

Before installing OpenNMS , we will wanna install PostgreSQL and do a few things to make sure PostgreSQL is working fine.

$ sudo apt-get update
$ sudo apt-get install postgresql

installing postgresql

Checking the version of PostgreSQL

Now, after postgresql has been installed. We'll wanna check the version of PostgreSQL installed. Make sure you install the latest PostgreSQL 9.4 on your Ubuntu Server.



$ psql --version

Alowing User Access to the Database

To allow connections as the postgres user to authenticate without a password, we must change options in the pg_hba.conf file. On Debian based systems, this will be located at /etc/postgresql/$PGVERSION/main/pg_hba.conf, where “$PGVERSION” is the environment variable we set earlier containing the version of your PostgreSQL database.

Edit your “/etc/postgresql/$PGVERSION/main/pg_hba.conf” file as root permission. It should have entries similar to the following at the bottom.

$ sudo nano /etc/postgresql/9.1/main/pg_hba.conf

Find the following lines:

local   all         all                               peer
host    all         all          ident
host    all         all         ::1/128               ident

And, replace peer and ident to trust which will finally look like the following:

local   all         all                               trust
host    all         all          trust
host    all         all         ::1/128               trust

postgresql configuration

Once you have finished making changes, restart the database (as root):

$ sudo service postgresql restart

3. Installing JDK 7

To install JDK, we'll execute the following commands in a shell or terminal.

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java7-installer

add java repo

Important note: As OpenNMS doesn’t support Java 8 yet, It is extremely recommended to use Java 7. While future versions of OpenNMS will support Java 8, the current stable 1.12 series of releases is not supported on Java 8. 

4. Verification of a local mail transfer agent

OpenNMS sends out e-mail by default through a local mail transfer agent listening on port 25. We'll need to confirm that a MTA (e.g. exim or postfix) is installed. One way to check for this is to telnet to port 25 on the server and ensure a SMTP banner is displayed.

If a MTA is not installed, we can install it with the following command:

$ sudo apt-get install default-mta

installing mta

For Debian, the default MTA is exim. Accept the default debconf configuration responses when configuring exim.

5. Installing OpenNMS

Now, after we have installed and fulfilled all the prerequisites, we'll finally install our OpenNMS in our Ubuntu Server 14.04 LTS . To do so, we'll need to execute the following command.

$ sudo apt-get install opennms

install opennms

Also, the installer will tell you that IPLIKE installation has been failed.

You can install IPLIKE manually using this command:

$ sudo /usr/sbin/

6. Configuring Java

If we wanna do manual upgrade instead of automatic update and wanna disable update for opennms then, we'll wanna edit file /etc/apt/sources.list.d/opennms.list and comment all lines in it. Or simply just delete that file with the command below.

$ sudo rm -rf /etc/apt/sources.list.d/opennms.list

removing opennms sources

Then, Update the local repository index using command:

$ sudo apt-get update

Then, we wanna direct OpenNMS to the Java version we wanna use. If we installed the recommended Sun/Oracle JDK, all we need to do is point it to /usr/java/latest:

$ sudo /usr/share/opennms/bin/runjava -s

Creating Database for OpenNMS

$ sudo /usr/share/opennms/bin/install -dis

creating opennms database


-d – to update the database.
-i – to insert any default data that belongs in the database.
-s – to create or update the stored procedures OpenNMS uses for certain kinds of data access.

Finally, start OpenNMS service:

$ sudo service opennms start

7. OpenNMS Management Interface

Finally, our OpenNMS Management has been successfully installed and running awesome. Now, open up your browser, and point it to http://ip-address:8980/opennms. The following screen should appear. Enter the username and password. The default username and password is admin/admin.


Finally, we installed and configured OpenNMS on our Ubuntu Server 14.04 LTS "Trusty".  OpenNMS is really a great tool for Network Monitoring. It is a Free and Open Source Software and world’s first enterprise grade network monitoring system that can be used to monitor tens of thousands of unlimited devices with a single instance. Enjoy OpenNMS. If you have any questions, comments or feedback please do comment them below. Your comments will help us improve our contents. Thank You !

Arun Pyasi 8:15 pm


Your email address will not be published. Required fields are marked *