CentOSLinuxTutorials

How To Install OpenNMS on CentOS 7

Install OpenNMS on CentOS 7

In this tutorial, we will show you how to install and configure OpenNMS on your CentOS 7 server. For those of you who didn’t know, OpenNMS is a free open source enterprise-level network monitoring and management platform that provides information to allow us to make decisions in regard to future network and capacity planning. OpenNMS is designed to manage tens of thousands of devices from a single server as well as manage unlimited devices using a cluster of servers. It includes a discovery engine to automatically configure and manage network devices without operator intervention.

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 OpenNMS on a CentOS 7 server.

Prerequisites

  • A server running one of the following operating systems: CentOS 7.
  • 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).
  • 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 CentOS 7

Step 1. First, let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Installing Java for OpenNMS.

If you do not have Java installed, you can follow our guide here.

Step 3. Installing PostgreSQL for OpenNMS.

If you do not have PostgreSQL installed, you can follow our guide here. Once you have installed PostgreSQL, now you’ll need to make sure that PostgreSQL is up and active. Let’s run the below command to first initialize the database and then start its services:

postgresql-setup initdb 
systemctl start postgresql
systemctl enable postgresql

Step 4. Configure PostgreSQL

Edit the postgresql.conf, located in /var/lib/pgsql/data directory and Open the postgresql.conf file in a text editor and configure the following parameters as shown:

### nano /var/lib/pgsql/data/postgresql.conf
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
listen_addresses = 'localhost'
max_connections = 256
#------------------------------------------------------------------------------
# RESOURCE USAGE
#------------------------------------------------------------------------------
shared_buffers = 1024MB

Then permit access to the Database by editing the “pg_hba.conf” file as shown below:

### nano /var/lib/pgsql/data/pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust

Saved changes and then restart PostgreSQL services:

systemctl restart postgresql

Step 4. Installing OpenNMS.

First, add the OpenNMS RPM Repository:

rpm -ivh http://yum.opennms.org/repofiles/opennms-repo-stable-rhel7.noarch.rpm

Then, install OpenNMS:

yum update
yum install opennms

Once the installation is successfully built, configure JAVA for OpenNMS:

/opt/opennms/bin/runjava -s

Now it’s time to start the OpenNMS installer that will create and configure the OpenNMS database, while the same command will be used in case we want to update it to the latest version:

/opt/opennms/bin/install -dis

Finally, start the OpenNMS service using the command:

systemctl start opennms
systemctl enable opennms

Step 5. Configure firewall for OpenNMS.

Then follow the below instruction to configure the firewall for permitting OpenNMS:

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

Step 6. Accessing OpenNMS.

OpenNMS will be available on HTTP port 8980 by default. Open your favorite browser and navigate to http://your-domain.com:8980 or http://server-ip:8980. Give the username and password whereas the default username and password is admin/admin. If you are using a firewall, please open port 8980 to enable access to the control panel.

Install OpenNMS on CentOS 7

Congratulations! You have successfully installed OpenNMS. Thanks for using this tutorial for installing OpenNMS Network Monitoring and Management Platform on your CentOS 7 system. For additional help or useful information, we recommend you check the official 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!

Save

Save

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button