OpenNMS system installation (Linux-CentOS7)
Note: here we take CentOS7 as an example to introduce the installation process of OpenNMS.
Prepare the environment
Install git
Yum install git
Install autoconf
Yum install autoconf automake libtool
1. To install Jdk, first download the corresponding version of jdk at http://www.oracle.com/technetwork/java/javase/downloads/index.html
After the installation is complete, you need to set the environment variables as follows:
Vi / etc/profile.d/java.sh
#! / bin/sh
JAVA_HOME=/usr/java/default
PATH=$JAVA_HOME/bin:$PATH
Export PATH JAVA_HOME
After configuring environment variables, you need to load environment variables. Command: su-
two。 Install Jicmp at https://github.com/OpenNMS/jicmp and https://github.com/OpenNMS/jicmp6
Currently, you need to install jicmp and jicmp6, as follows:
Git clone https://github.com/OpenNMS/jicmp.git
Cd jicmp
Git submodule update-init-recursive
Autoreconf-fvi
. / configure-- prefix=/usr
Make
Make install
Install jicmp6
Git clone https://github.com/OpenNMS/jicmp6.git
Cd jicmp6
Git submodule update-init-recursive
Autoreconf-fvi
. / configure-- prefix=/usr
Make
Make install
3. Install the database database using Postgres, you can use the default installed version of the system, if you do not choose to install CentOS, you can use the yum install command to install.
Online installation
Yum install postgresql-server
After the database is installed, you need to initialize the database before you can use it. The command is:
Postgresql-setup initdb
Start the database:
Systemctl start postgresql
Add host access, edit the file / var/lib/pgsql/data/pg_hba.conf, and add the following:
Host all all 127.0.0.1/32 trust
Modify the host access restrictions, edit the file / var/lib/pgsql/data/postgresql.conf, and modify as follows:
Listen_addresses ='*'
After modifying the rule, you need to load the configuration, command:
Systemctl reload postgresql
Note: other hosts need to turn off the firewall to access the database.
Command: systemctl stop firewalld
4. Install the OpenNMS system, download address: https://sourceforge.net/projects/opennms/
Installation and operation require the use of root users.
Unzip standalone-opennms-installer-20.1.0-1.zip
= =
Create the installation directory, command:
Mkdir / opt/opennms
Release the system program to the installation directory:
Tar-zxf opennms-20.1.0.tar.gz-C / opt/opennms
Configure the environment:
/ opt/opennms/bin/runjava-s
Install the system:
/ opt/opennms/bin/install-dis
At this point, the system installation is complete.
= =
5. Start the system boot command:
/ opt/opennms/bin/opennms-v start
Stop the command:
/ opt/opennms/bin/opennms-v stop
View the running status:
/ opt/opennms/bin/opennms-v status
The OpenNMS installation video will be available at the college later.