How to Install OpenNMS on Centos / RHEL 8.

Windows Articles

Monitoring Ubuntu 20.04 with Stacer

Normally if we use Linux on a production server, it is important to monitor it. On the other hand, in everyday use, many users...

How to get the Android 11 Notification Panel

It's no secret that even though Android is the most widely used mobile operating system. Not always our device has the latest...

How to create backups in Windows 10 with FileFort Backup

There is no doubt that the computer is an essential element in our lives. Indeed, its uses go beyond work or study....

Trisquel 9.0 available

Trisquel is a GNU/Linux distribution endorsed and supported by the Free Software Foundation. This means that in addition to incorporating the Linux...

How to install PandoraFMS on CentOS 8?

Worldwide many IT infrastructures are running Linux on one of their servers. This opens the door to an endless number of different...

What is OpenNMS?

OpenNMS is a free & open source highly configurable, scaleable, extensible and cross-platform network Monitoring and network management platform. It is built using Java.

Features:

  • Device & Application Monitoring
  • Event-driven Architecture.
  • It supports the collection of performance from Industry standard agents via SNMP,JMX,WMI,NPRE,NSCLient++ & XMP simply through configuration.
  • Provides easy integration to extend service polling, performance & data collection framework.
  • Different modes like maual, detected or ReST API driven interfaces.

OpenNMS Requirements:

Operating System: Red Hat Enterprise Linux 8 or Centos 8.
Minimal Hardware: 2 CPU, 2 GB RAM, 20 GB Disk.

In this tutorial, we will learn how to install & setup the latest OpenNMS Horizon network service monitoring software in Centos / RHEL 8.

Step 1: Install Java & Setting Java_Home

yum install java-11-openjdk

Check installed version

java -version

Add this line to set Java Environment to all users at boot time.

export JAVA_HOME=/usr/lib/jvm/java-11

Step 2: Installing OpenNms Horizon

For installing OpenNMS Horizon, add the following yum repository & then import GPG key.

yum -y install https://yum.opennms.org/repofiles/opennms-repo-stable-rhel8.noarch.rpm
rpm --import https://yum.opennms.org/OPENNMS-GPG-KEY

Now, Install opennms meta package together alognwith all its built-in dependencies like jicmp6, opennms-webapp-jettty, postgresql and many more.

yum -y install opennms

Confirm that packages are successfully installed.

cd /opt/opennms

Step 3: Initializing & Setup PostgreSQL

Initialize the PostgreSQL database

postgresql-setup initdb

Start & enable PostgreSQL services and check status for confirmation.

systemctl start postgresql
systemctl enable postgresql
systemctl status postgresql

Switch to PostgreSQL user account to create access to PostgreSQL. After it create opennms database user with a password & create an opennms database.

su - postgres
createuser -P opennms
createdb -O opennms opennms

Setup password for Postgres super user.

psq; -c "ALTER USER postgres WITH PASSWORD 'admin123';"
exit

Modify the access policy for PostgreSQL in the /var/lib/pgsql/data/pg_hba.conf config file.

vi var/lib/pgsql/data/pg_hba.conf

Change the authentication method to md5 by finding given lines to allow OpenNMS Horizon accessing database over LAN with a MD5 hashed password.

host           all            all           127.0.0.1/32           md5
host all all ::1/128 md5

Reload postgresql to take effect of configuration.

systemctl reload postgresql

Now, configure the db access in OpenNMS Horizon by opening following file.

vim /opt/opennms/etc/opennms-datasources.xml. 

And set up Credentials.

Step 4: Initialize & Start OpenNMS Horizon

Now, you need to integrate the default version of JAVA with OpenNMS. Run the following command to detect environment and persist in the /opt/opennms/etc/java.conf file.

/opt/opennms/bin/runjava -s

On next step, you need to run the OpenNMS installer which will initialize the db and detect system libararies persisted in /opt/opennms/etc/libararies.properties.

/opt/opennms/bin/install -dis

Start OpenNMS service via systemd for the mean time, enable it to auto-start at system boot.

systemctl start opennms
systemctl enable opennms
systemctl status opennms

Allow 8990 port to access Web Console.

firewall-cmd --permanent --add-port=8980/tcp
firewall-cmd --reload

Step 5: Access OpenNMS Web Console & Login

Go to your browser and type any of the following command to access the web console.

http://SERVER_IP:8980/opennms
OR
http://FDQN-OF-YOUR-SERVER:8980/opennms

Provide authentication details as default username admin & password admin.

This is not secure so you should change your password. To do so, go to main navigation menu on admin.

Under Account Self-Service, click Change Password”.
Enter the old, set new and click “Submit”. Afterwards, logout and login with your new user details for security.

That’s it You’ve done installing OpenNMS, if have any queries regarding this tutorial feel free to ask!

More articles

2 COMMENTS

  1. Some typo errors
    psq; -c “ALTER USER postgres WITH PASSWORD ‘admin123’;”
    should be
    psql -c “ALTER USER postgres WITH PASSWORD ‘admin123’;”

    vi var/lib/pgsql/data/pg_hba.conf
    should be
    vi /var/lib/pgsql/data/pg_hba.conf

    vim /opt/opennms/etc/opennms-datasources.xml.
    should be
    vim /opt/opennms/etc/opennms-datasources.xml

    HTH

    Marco

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Monitoring Ubuntu 20.04 with Stacer

Normally if we use Linux on a production server, it is important to monitor it. On the other hand, in everyday use, many users...

How to get the Android 11 Notification Panel

It's no secret that even though Android is the most widely used mobile operating system. Not always our device has the latest...

How to create backups in Windows 10 with FileFort Backup

There is no doubt that the computer is an essential element in our lives. Indeed, its uses go beyond work or study....

Trisquel 9.0 available

Trisquel is a GNU/Linux distribution endorsed and supported by the Free Software Foundation. This means that in addition to incorporating the Linux...

How to install PandoraFMS on CentOS 8?

Worldwide many IT infrastructures are running Linux on one of their servers. This opens the door to an endless number of different...
x