Install OpenNMS Network Monitoring in Debian and Ubuntu

OpenNMS (Open Network Management System) is a free and open source, scalable, extensible, enterprise-grade and cross-platform Java-based network management platform was designed to monitor critical services on remote machines and gathers the information of remote hosts data by using SNMP and JMX (Java Management Extensions).

Read Also: Install OpenNMS Network Monitoring Tool in CentOS/RHEL 7

OpenNMS runs on Linux and Windows operating systems and comes with a web-based console for easily administering networks and applications, supported by a Postgres database management system in the backend.

OpenNMS Requirements

  • Debian 9 or higher, Ubuntu 16.04 LTS or higher
  • Installed OpenJDK 11 Development Kit
  • 2 CPU, 2 GB RAM, 20 GB disk

In this article, we will explain how to install and setup the latest OpenNMS Horizon network service monitoring software in Debian and Ubuntu Linux distributions.

Step1: Installing Java – OpenJDK 11 in Ubuntu

First, install the most recent version of OpenJDK Java 11 using the following apt command.

$ sudo apt-get install openjdk-11-jdk

Next, verify the version of Java installed on your system.

$ java -version
Check Java Version in Ubuntu

Then set the Java environment variable for all users on boot time, by adding the following line in /etc/profile file.

export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64

save the file and run the following command to read /etc/profile file.

$ source /etc/profile

Step 2: Install OpenNMS Horizon in Ubuntu

To install OpenNMS Horizon, add the apt repository in /etc/apt/sources.list.d/opennms.list and add GPG key, then update the APT cache using the following commands.

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

Next, install OpenNMS Horizon meta-packages (opennms-core and opennms-webapp-jetty) with all built-in dependencies (jicmp6 and jicmp, postgresql and postgresql-libs).

$ sudo apt install opennms

Then verify that the OpenNMS meta packages have been installed in the /usr/share/opennms directory using the tree utility.

$ cd /usr/share/opennms
 $ tree -L 1
View OpenNMS Installation Directory

Note: It is recommended to disable the OpenNMS Horizon apt repository after installation to prevent upgrades while it is running:

$ sudo apt-mark hold libopennms-java libopennmsdeps-java opennms-common opennms-db

Step 3: Initialize and Setup PostgreSQL

On Debian and Ubuntu, immediately after installing the packages, the installer initializes Postgres database, starts the service and enables it to auto-start at system boot.

To check if the service is up and running, run the following command:

$ sudo systemctl status postgresql
Check Postgres Service Status

Next, switch to the postgres user account and create an opennms database user with a password.

$ sudo su - postgres
 $ createuser -P opennms
 $ createdb -O opennms opennms
Create OpenNMS Database

Now secure the postgres default/superuser account by setting a password.

Set Postgres Superuser Password

At this stage, you need to set up the database access in OpenNMS Horizon configuration file.

$ sudo vim /usr/share/opennms/etc/opennms-datasources.xml

Find the sections below and set credentials to access the PostgreSQL database:

<jdbc-data-source name="opennms"
 password="opennms-db-user-passwd” />
 <jdbc-data-source name="opennms-admin"
 password="postgres-super-user-passwd" />
Configure Database Access

Save the changes in the file and close it.

Step 4: Initialize and start OpenNMS Horizon

To initialize OpenNMS, you need to intergrate it with Java. So, run the following command to detect the Java environment and persist in /usr/share/opennms/etc/java.conf configuration file.

$ sudo /usr/share/opennms/bin/runjava -s
Integrate Java with OpenNMS

Next, you need to initialize the database and detect system libraries persisted in /opt/opennms/etc/ by running the OpenNMS installer.

$ sudo /usr/share/opennms/bin/install -dis
Run OpenNMS Installer

Now start OpenNMS service via systemd for now, then enable it to auto-start at system startup and check its status with these commands.

$ sudo systemctl start opennms
 $ sudo systemctl enable opennms
 $ sudo systemctl status opennms
Start and Verify OpenNSM Service

If you have a UFW firewall running on your system, you need to open the port 8980 in your firewall.

$ sudo ufw allow 8980/tcp
 $ sudo ufw reload

Step 5: Access OpenNMS Web Console and Login

Now open a web browser and point it to the following URL to access the OpenNMS web console.


After the login interface shows up as shown in the following image, use the default login credentials: username is admin and the password is admin.

OpenNMS Web Console Login

Once you have successfully logged on for the first time, you will access the admin dashboard.

OpenNMS Default Admin Dashboard

Next, you need to change the default admin password by going to the main navigation menu, click “adminChange Password, under User Account Self-Service, click “Change Password“.

Enter the current/default password, set a new password and confirm it, then Click “Submit“. Afterwards logout and login with your new password.

Finally, learn how to set up, configure, and maintain an OpenNMS Horizon via the web interface, add nodes and application by consulting the OpenNMS Administrators Guide.

Read Also: How to Add Hosts in OpenNMS Monitoring Server

OpenNMS is an enterprise-grade network and application monitoring tool. As usual, reach us through the feedback form below for any questions or comments about this article.

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

4 thoughts on “Install OpenNMS Network Monitoring in Debian and Ubuntu”

  1. Trying to install the last version of OpenNMS in the last stable version of Debian leads to an apt error with the repositories:

    [email protected]:~# apt update Ign:1 ./ InRelease Ign:2 stable InRelease Hit:3 ./ Release Hit:4 stable Release Hit:7 buster-backports InRelease Hit:8 buster InRelease Hit:9 stretch InRelease Hit:10 buster/updates InRelease Hit:11 buster-updates InRelease Hit:12 stable InRelease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. W: Conflicting distribution: stable Release (expected stable but got opennms-24) [email protected]:~# 

    That error can be fixed just changing the stable keyword in /etc/apt/sources.list.d/opennms.list repository file with opennms-24.

    [email protected]:~# apt update Hit:1 stretch InRelease Hit:2 buster InRelease Hit:3 buster/updates InRelease Hit:4 buster-backports InRelease Ign:5 ./ InRelease Hit:6 buster-updates InRelease Hit:7 ./ Release Hit:9 stable InRelease Ign:10 opennms-24 InRelease Get:11 opennms-24 Release [11.2 kB] Get:12 opennms-24 Release.gpg [224 B] Get:13 opennms-24/main Sources [3,696 B] Get:14 opennms-24/main i386 Packages [25.8 kB] Get:15 opennms-24/main i386 Contents (deb) [97.6 kB] Fetched 138 kB in 18s (7,643 B/s) Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. 

    But after that I get dependency errors from apt when I’m trying to install OpenNMS (trying to install those packages leads to another dependency package errors).

    [email protected]:~# apt install opennms Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: opennms : Depends: opennms-server (= 24.1.2-1) but it is not going to be installed Depends: opennms-webapp-jetty (= 24.1.2-1) but it is not going to be installed Recommends: opennms-source (= 24.1.2-1) but it is not going to be installed E: Unable to correct problems, you have held broken packages. 

    Changing the repository from opennms-24 to opennms-23 or opennms-22 leads to another unmet dependency errors with PostgreSQL.

    Seems obvious the Debian OpenNMS repository has broken dependency packages, so, there’s any other alternative to this or just have to wait to be fixed…?


Got something to say? Join the discussion. Cancel reply