CentOS 7.x Install OpenNMS

From Notes_Wiki
Revision as of 16:30, 2 August 2017 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb>CentOS_7.x_OpenNMS|CentOS 7.x OpenNMS</yambe:breadcrumb> =CentOS 7.x Install OpenNMS= To install OpenNMS on CentoS7 use following steps: #If you have java i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb>CentOS_7.x_OpenNMS|CentOS 7.x OpenNMS</yambe:breadcrumb>

CentOS 7.x Install OpenNMS

To install OpenNMS on CentoS7 use following steps:

  1. If you have java installed on your machine. Please Uninstall.
    yum remove openjdk-7
    or
    yum remove java*
  2. Set hostname in '/etc/hostname'
    opennms
  3. Point hostname with ipaddress in '/etc/hosts'
    192.168.1.X opennms


Install Oracle JAVA

  1. Download Oracle java from below website
    http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  2. Install Oracle java
    yum localinstall jdk-8u131-linux-x64.rpm
  3. Set JAVA_Home by appending following to /root/.bashrc and /etc/profile files
    export JAVA_HOME=/usr/java/jdk1.8.0_131/jre
    Here update JRE path and number appropriately based on install JDK
  4. Logoff for JAVA settings to take effect


Install OpenNMS

  1. Add opennms repository
    rpm -Uvh https://yum.opennms.org/repofiles/opennms-repo-stable-rhel7.noarch.rpm
    rpm --import https://yum.opennms.org/OPENNMS-GPG-KEY
  2. Install opennms
    yum -y install opennms


Prepare PostgreSQL

  1. Initialization of the PostgreSQL database
    postgresql-setup initdb
  2. Start & enable PostgreSQL
    systemctl start postgresql
    systemctl enable postgresql
  3. Create db for OpenNMS
    su - postgres
    createuser -P opennms
    createdb -O opennms opennms
    exit
  4. Set password for Postgres super user
    su - postgres
    psql -c "ALTER USER postgres WITH PASSWORD 'YOUR-POSTGRES-PASSWORD';"
    exit
  5. To allow OpenNMS access to the database over the local network PostgreSQL has to be configured in '/var/lib/pgsql/data/pg_hba.conf'
    host all all 127.0.0.1/32 md5
    host all all  ::1/128 md5
  6. Restart PostgreSQL
    systemctl restart postgresql
  7. configure the OpenNMS database in '/opt/opennms/etc/opennms-datasources.xml'


Initialize OpenNMS

  1. Configuration of Java environment for OpenNMS
    /opt/opennms/bin/runjava -s
  2. Initialization of database and system libraries
    /opt/opennms/bin/install -dis
  3. System startup configuration for OpenNMS
    systemctl enable opennms
  4. Start OpenNMS
    systemctl start opennms
  5. Access opennms from web
    http://<ip-or-fqdn-of-your-server>:8980/opennms
  6. Install RRD tool
    yum install rrdtool -y
  7. Install epel-release
    yum install epel-release
  8. Install R Statistics System
    yum install R -y


Configure email

  1. Configure email settings in java properties file '/opt/opennms/etc/javamail-configuration.properties'
    org.opennms.core.utils.useJMTA=false
    org.opennms.core.utils.transport=smtp
    org.opennms.core.utils.mailHost=smtp.gmail.com
    org.opennms.core.utils.smtpport=587
    org.opennms.core.utils.smtpssl.enable=false
    org.opennms.core.utils.authenticate=true
    org.opennms.core.utils.authenticateUser=XXXXXXX@gmail.com
    org.opennms.core.utils.authenticatePassword=XXXXXXX
    org.opennms.core.utils.starttls.enable=true
    org.opennms.core.utils.messageContentType=text/html
    org.opennms.core.utils.charset=UTF-8


Steps contributed by Pavan Ponamala

<yambe:breadcrumb>CentOS_7.x_OpenNMS|CentOS 7.x OpenNMS</yambe:breadcrumb>