How to Install OpenNMS on Centos 8

How to Install OpenNMS on Centos 8

OpenNMS is a free and open-source enterprise grade network monitoring and network management platform. It is developed and supported by a community of users and developers and by the OpenNMS Group, offering commercial services, training and suppor

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

How to Install OpenNMS on Centos 8

Follow the following steps to install OpenNMS on centOS 8:

  • Step 1: Install Java & Setting Java_Home
  • Step 2: Installing OpenNMS Horizon
  • Step 3: Initializing & Setup PostgreSQL
  • Step 4: Initialize & Start OpenNMS Horizon
  • Step 5: Access OpenNMS Web Console & Login

Step 1: Install Java & Setting Java_Home

First of all, open the terminal or command line and execute the following command into it to install java on centOS 8:

yum install java-11-openjdk

Once the java installation is completed, execute the following command on the terminal or command line to check the java 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

Then add the following yum repository & then import GPG key:

yum -y install
rpm --import

Now, execute the following command on the terminal or command line to install the OpenNMS meta package together along with all its built-in dependencies like jicmp6, OpenNMS-webapp-jettty, PostgreSQL:

yum -y install opennms

Confirm that packages are successfully installed:

cd /opt/opennms

Step 3: Initializing & Setup PostgreSQL

Now, execute the following command on the terminal or command line to 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 the PostgreSQL user account to create access to PostgreSQL. After it creates OpenNMS database user with a password & creates 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';"

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 to access the database over LAN with an MD5 hashed password.

host           all            all            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 the following file:

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

And set up Credentials.

Step 4: Initialize & Start OpenNMS Horizon

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

/opt/opennms/bin/runjava -s

In the next step, we need to run the OpenNMS installer which will initialize the DB and detect system libraries persisted in /opt/opennms/etc/

/opt/opennms/bin/install -dis

Start OpenNMS service via the system in the meantime, and 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 commands to access the web console:


Provide authentication details as default username admin & password admin.

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

Under Account Self-Service, click Change Password”.
Enter the old, set new, and click “Submit”. Afterward, log out and log in with your new user details for security.

That’s it, we have done installing OpenNMS.


In this tutorial, we have learned how to install and configure OpenNMS in centOS 8.

Recommended CentOS Tutorials


Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

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