How To Install OpenNMS on CentOS 7

Install OpenNMS on CentOS 7

In this tutorial, we will show you how to install and configuration 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 regards to future network and capacity planning. OpenNMS 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 through the step by step installation of OpenNMS on a CentOS 7 server.

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 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 the 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 to 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