UbuntuUbuntu Based

How To Install OpenNMS on Ubuntu 22.04 LTS

Install OpenNMS on Ubuntu 22.04

In this tutorial, we will show you how to install OpenNMS on Ubuntu 22.04 LTS. For those of you who didn’t know, OpenNMS is a powerful, open-source network monitoring and management platform that offers a comprehensive set of features for monitoring the health and performance of your network infrastructure. With its scalable architecture, flexible configuration options, and extensive plugin ecosystem, OpenNMS empowers network administrators to proactively identify and resolve issues, ensuring optimal network performance and availability.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the OpenNMS monitoring and network management on Ubuntu 22.04 (Jammy Jellyfish). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.


  • A server running one of the following operating systems: Ubuntu 22.04, 20.04, and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install OpenNMS on Ubuntu 22.04 LTS Jammy Jellyfish

Step 1. To begin the installation process, it is essential to update your Ubuntu system to the latest available packages. This ensures that you have access to the most recent security patches, bug fixes, and compatibility updates. Open a terminal and execute the following commands:

sudo apt update
sudo apt upgrade

Step 2. Installing Java.

OpenNMS is a Java-based application, and therefore, it requires a compatible Java Development Kit (JDK) to be installed on your system. For optimal compatibility and performance, we recommend installing OpenJDK 11. To install OpenJDK 11 on Ubuntu 22.04 LTS, run the following command:

sudo apt install openjdk-11-jdk

Once the installation is complete, you can verify the Java version by executing:

java -version

Step 3. Installing PostgreSQL Database.

OpenNMS relies on a PostgreSQL database to store its configuration settings, performance metrics, and event data. To install PostgreSQL on Ubuntu 22.04 LTS, use the following command:

sudo apt install postgresql

After the installation, you need to create a dedicated database and user for OpenNMS. Switch to the postgres user by executing:

sudo -u postgres psql

Once inside the PostgreSQL shell, create the OpenNMS database and user with the following commands:

CREATE USER opennms WITH PASSWORD 'your_secure_password';

To allow OpenNMS to connect to the PostgreSQL database, modify the PostgreSQL configuration file /etc/postgresql/14/main/pg_hba.conf. Open the file with a text editor:

sudo nano /etc/postgresql/14/main/pg_hba.conf

Locate the line that starts with local and change the authentication method from peer to md5:

local   all             all                                     md5

Save the changes and exit the text editor. Restart the PostgreSQL service for the changes to take effect:

sudo systemctl restart postgresql

Step 4. Installing OpenNMS on Ubuntu 22.04.

To install OpenNMS using the package manager, you need to add the official OpenNMS repository to your system. Start by importing the OpenNMS GPG key:

wget -O - https://debian.opennms.org/OPENNMS-GPG-KEY | sudo apt-key add -

Next, create a new file named opennms.list in the /etc/apt/sources.list.d/ directory:

sudo nano /etc/apt/sources.list.d/opennms.list

Add the following line to the file, specifying the OpenNMS stable repository:

deb https://debian.opennms.org stable main

Save the file and exit the text editor then, you can now proceed with the installation of OpenNMS. Execute the following command:

sudo apt update
sudo apt install opennms

Once the installation is complete, initialize the OpenNMS database and configure it to work with PostgreSQL:

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

Step 5. Configure OpenNMS.

To ensure that OpenNMS can connect to the PostgreSQL database, you need to update the database configuration file. Open the file /usr/share/opennms/etc/opennms-datasources.xml with a text editor:

sudo nano /usr/share/opennms/etc/opennms-datasources.xml

Locate the <jdbc-data-source> section and update the <url>, <user-name>, and <password> fields with the appropriate values for your PostgreSQL database:

<jdbc-data-source name="opennms"
password="your_secure_password" />

Next, set the Java environment variables required by OpenNMS:

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

To allow incoming connections to the OpenNMS web interface, open the necessary port in the firewall:

sudo ufw allow 8980/tcp

Finally, start the OpenNMS service and enable it to start automatically on system boot:

sudo systemctl start opennms
sudo systemctl enable opennms

Step 6. Access OpenNMS Web Interface

With OpenNMS installed and configured, you can now access the web interface to start monitoring your network. Open a web browser and navigate to:


Log in using the default credentials:

  • Username: admin
  • Password: admin

Install OpenNMS on Ubuntu 22.04

The OpenNMS web interface provides a user-friendly dashboard that allows you to configure monitoring settings, view network topology, manage events and alarms, and generate reports. Take some time to explore the various features and customize OpenNMS to suit your specific network monitoring requirements.

Install OpenNMS on Ubuntu 22.04

Congratulations! You have successfully installed OpenNMS. Thanks for using this tutorial for installing the OpenNMS monitoring and network management tool on Ubuntu 22.04 LTS Jammy Jellyfish system. For additional help or useful information, we recommend you check the OpenNMS website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!


r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button