facebook twitter youtube facebook facebook facebook

E-Mail : info@askmlabs.com

Phone : +1.215.353.8306

Home » , , » Installing OpenNMS in CentOS 6

Installing OpenNMS in CentOS 6

Written By askMLabs on Friday, February 21, 2014 | 9:33 AM

In this article, we will see how to install OpenNMS in CentOS 6.5 version.

OpenNMS is the world’s first enterprise grade network management application platform developed under the open source model. It is a free and open-source enterprise grade network monitoring and network management platform. It is developed and supported by a community of user and developers as well as by the The OpenNMS Group, offering commercial services, training and support.

The installation procedure differs based on the host OS you choose. As we are installing it on CentOS, i am choosing to install using YUM/RPM method. For other OS installation , please refer to the link  Installing OpenNMS

1) Check the Java Version and Install repository RPM.

[root@askmlabstools pgsql]# which java
/usr/bin/java
[root@askmlabstools pgsql]# java -version
java version "1.7.0_45"
OpenJDK Runtime Environment (rhel-2.4.3.4.el6_5-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
[root@askmlabstools pgsql]#
[root@askmlabstools pgsql]# rpm -Uvh http://yum.opennms.org/repofiles/opennms-repo-stable-rhel6.noarch.rpm
Retrieving http://yum.opennms.org/repofiles/opennms-repo-stable-rhel6.noarch.rpm
warning: /var/tmp/rpm-tmp.n91osI: Header V3 DSA/SHA1 Signature, key ID 5b9efd43: NOKEY
Preparing...                ########################################### [100%]
   1:opennms-repo-stable    ########################################### [100%]
[root@askmlabstools pgsql]#

2) Verify if you have postgresql installed and operational. If you don't have postgresql installed, please complete the following steps to install postgre.
yum install postgresql postgresql-server
/sbin/service postgresql start
Some distributions will require you to first initialize the database. If you see an error when running that command, try initdb first, and then start again
/sbin/service postgresql initdb
/sbin/service postgresql start
/sbin/chkconfig postgresql on
Modify the file pg_hba.conf located under /var/lib/pgsql/data/ as shown below ...
local   all         all                               trust
host    all         all         127.0.0.1/32          trust
host    all         all         ::1/128               trust
Then restart the postgre database as root user.
/sbin/service postgresql restart 

3) Now install OpenNMS using the following command ....
[root@askmlabstools data]# yum -y install opennms
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
.....
.....
.......
Installed:
  opennms.noarch 0:1.12.4-1
Dependency Installed:
  jdk.x86_64 2000:1.6.0_24-fcs     jicmp.x86_64 0:1.4.1-1     jicmp6.x86_64 0:1.2.1-1     opennms-core.noarch 0:1.12.4-1     opennms-webapp-jetty.noarch 0:1.12.4-1
Complete!
[root@askmlabstools data]#
4) Configure java to tell OpenNMS which java it has to use. Execute the following command to complete java configuration.
[root@askmlabstools bin]# /opt/opennms/bin/runjava -S /usr/java/latest/bin/java
runjava: checking specified JRE: "/usr/java/latest/bin/java"...
runjava: specified JRE is good.
runjava: value of "/usr/java/latest/bin/java" stored in configuration file
[root@askmlabstools bin]# 

5) Now create database in postgresql database for OpenNMS to use. Run the following command to create database...
[root@askmlabstools bin]# /opt/opennms/bin/install -dis
===============================================================
OpenNMS Installer
===============================================================
Configures PostgreSQL tables, users, and other miscellaneous settings.
- searching for libjicmp.so:
  - trying to load /usr/lib64/libjicmp.so: OK
- searching for libjicmp6.so:
...
...
...
Finished in 2 seconds
Upgrade completed successfully!
[root@askmlabstools bin]#
Verify that you have schema created and able to connect to database using following commands .....
bash-4.1$ psql -p5432 -dpostgres
psql (8.4.18)
Type "help" for help.
postgres=# select * from pg_user;
 usename  | usesysid | usecreatedb | usesuper | usecatupd |  passwd  | valuntil | useconfig
----------+----------+-------------+----------+-----------+----------+----------+-----------
 postgres |       10 | t           | t        | t         | ******** |          |
 nagiosxi |    16384 | f           | f        | f         | ******** |          |
 opennms  |    16520 | t           | t        | t         | ******** |          |
(3 rows)
postgres=# \q
bash-4.1$ exit
6) Then install "iplike", which provides an API for easily performing complicated IP address queries.
[root@askmlabstools bin]# yum -y install iplike
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
..
..
Complete!
[root@askmlabstools bin]#
7) Modify iptables to allow opennms port to be accessible. Run following commands ...
iptables -A INPUT -p tcp -m tcp --dport 8980 -j ACCEPT
service iptables save 
8) Now restart OpenNMS service as root  user and access the url.
[root@askmlabstools bin]# /sbin/service opennms status
opennms is stopped
[root@askmlabstools bin]# /sbin/service opennms start
Starting OpenNMS:
Started OpenNMS, but it has not finished starting up
                                                           [FAILED]
[root@askmlabstools bin]#
[root@askmlabstools bin]# service opennms status
opennms is running
[root@askmlabstools bin]# service opennms restart
Stopping OpenNMS:                                          [  OK  ]
Starting OpenNMS: Started OpenNMS, but it has not finished starting up
                                                           [FAILED]
[root@askmlabstools bin]
Please follow my forum thread to resolve this issue. The link is here.

Finally the url to access OpenNMS is :   http://<YOUR-OPENNMS-IP>:8980/opennms/    
The default username and password to login to url are :  admin and admin.

Hope it helps
SRI

Reference:
Install OpenNMS

Share this article :

Related Articles By Category



Post a Comment

Thank you for visiting our site and leaving your valuable comment.

 
Support :
Copyright © 2013. askMLabs - All Rights Reserved
Proudly powered by Blogger