Difference between revisions of "CentOS 7.x Install OpenNMS"
From Notes_Wiki
(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...") |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x monitoring|Monitoring]] > [[CentOS 7.x OpenNMS|OpenNMS]] > [[CentOS 7.x Install OpenNMS]] | |||
To install OpenNMS on CentoS7 use following steps: | To install OpenNMS on CentoS7 use following steps: | ||
Line 137: | Line 136: | ||
Steps contributed by Pavan Ponamala | Steps contributed by Pavan Ponamala | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x monitoring|Monitoring]] > [[CentOS 7.x OpenNMS|OpenNMS]] > [[CentOS 7.x Install OpenNMS]] |
Latest revision as of 15:39, 28 August 2022
Home > CentOS > CentOS 7.x > Monitoring > OpenNMS > CentOS 7.x Install OpenNMS
To install OpenNMS on CentoS7 use following steps:
- If you have java installed on your machine. Please Uninstall.
- yum remove openjdk-7
- or
- yum remove java*
- Set hostname in '/etc/hostname'
- opennms
- Point hostname with ipaddress in '/etc/hosts'
- 192.168.1.X opennms
Install Oracle JAVA
- Download Oracle java from below website
- http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Install Oracle java
- yum localinstall jdk-8u131-linux-x64.rpm
- 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
- Logoff for JAVA settings to take effect
Install OpenNMS
- 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
- Install opennms
- yum -y install opennms
Prepare PostgreSQL
- Initialization of the PostgreSQL database
- postgresql-setup initdb
- Start & enable PostgreSQL
- systemctl start postgresql
- systemctl enable postgresql
- Create db for OpenNMS
- su - postgres
- createuser -P opennms
- createdb -O opennms opennms
- exit
- Set password for Postgres super user
- su - postgres
- psql -c "ALTER USER postgres WITH PASSWORD 'YOUR-POSTGRES-PASSWORD';"
- exit
- 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
- Restart PostgreSQL
- systemctl restart postgresql
- configure the OpenNMS database in '/opt/opennms/etc/opennms-datasources.xml'
Initialize OpenNMS
- Configuration of Java environment for OpenNMS
- /opt/opennms/bin/runjava -s
- Initialization of database and system libraries
- /opt/opennms/bin/install -dis
- System startup configuration for OpenNMS
- systemctl enable opennms
- Start OpenNMS
- systemctl start opennms
- Access opennms from web
- http://<ip-or-fqdn-of-your-server>:8980/opennms
- Install RRD tool
- yum install rrdtool -y
- Install epel-release
- yum install epel-release
- Install R Statistics System
- yum install R -y
Configure email
- 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
Home > CentOS > CentOS 7.x > Monitoring > OpenNMS > CentOS 7.x Install OpenNMS