OpenNMS is a powerful network monitoring and management system designed to help administrators monitor the availability and performance of their network resources. In this guide, we will walk you through the process of installing OpenNMS on an Ubuntu system.
Prerequisites
Before we begin, make sure you have the following prerequisites:
- A Ubuntu 22.04 system.
- Root or sudo access.
Step 1: Update System Packages
First, update your system’s package list and upgrade existing packages to their latest versions:
sudo apt update
sudo apt upgrade
Step 2: Install Java
OpenNMS requires Java to run. Install OpenJDK 11:
sudo apt install openjdk-11-jdk
Step 3: Install PostgreSQL Database
OpenNMS uses PostgreSQL as its database. Install it and create a database user for OpenNMS:
sudo apt install postgresql postgresql-contrib
sudo -u postgres createuser --no-password --createdb --no-createrole --no-superuser --login --inherit --replication --encrypted --encrypted-password=opennms opennms
Step 4: Download and Install OpenNMS
Visit the OpenNMS download page and get the link for the latest version. Download the OpenNMS package:
wget <download_link>
Install OpenNMS using dpkg:
sudo dpkg -i opennms-<version>.deb
Step 5: Configure OpenNMS
Edit the OpenNMS configuration file to set the database credentials:
sudo nano /opt/opennms/etc/opennms-datasources.xml
Update the <property>
elements under the PostgreSQL <local-tx-datasource>
section with the correct credentials:
<property name="opennms:JDBCURL" value="jdbc:postgresql://localhost:5432/opennms"/>
<property name="opennms:JDBCUser" value="opennms"/>
<property name="opennms:JDBCPassword" value="opennms"/>
Save and close the file.
Step 6: Initialize the Database
Run the following command to initialize the OpenNMS database:
sudo /opt/opennms/bin/install -dis
Step 7: Start OpenNMS
Start the OpenNMS service:
sudo systemctl start opennms
Enable OpenNMS to start on boot:
sudo systemctl enable opennms
Step 8: Access OpenNMS Web Interface
OpenNMS web interface runs on port 8980 by default. Open your browser and navigate to http://your_server_ip:8980/opennms
. Log in with the default credentials: Username admin
and Password admin
.
Conclusion
You have successfully installed OpenNMS Network Monitoring system on your Ubuntu 22.04 server. You can now configure OpenNMS to monitor your network resources and receive alerts on their status. Explore the OpenNMS documentation for advanced configuration and customization options.