Setup OpenNMS Horizon on openSUSE Leap 15.2

The recommendation for production environments is Debian/Ubuntu or CentOS/RHEL. Nevertheless, it is possible to install it on openSUSE Leap 15.2 with the instructions provided in this guide.

Installing OpenJDK 11 JDK

sudo zypper install java-11-openjdk-devel

Installing PostgreSQL server

sudo zypper install postgresql-server
sudo systemctl enable --now postgresql

Create a PostgreSQL user for OpenNMS Horizon, as password I have set opennms

sudo -i -u postgres createuser -P opennms
Enter password for new role:
Enter it again:

Create a database for OpenNMS Horizon

sudo -i -u postgres createdb -O opennms opennms

Set a Postgres root user password

sudo -i -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres-root-password';"

Edit the Postgres host-based authentication file

sudo vi /var/lib/pgsql/data/pg_hba.conf

Set password hashing from ident to md5 for localhost connections

host    all             all               md5
# IPv6 local connections:
host    all             all             ::1/128                 md5

Restart PostgreSQL to apply the changes

sudo systemctl restart postgresql

Install insserv compatibility package

sudo zypper install insserv-compat

Add OpenNMS RPM repository

sudo zypper addrepo opennms

You have to trust the following GPG key

Building repository 'openSUSE-Leap-15.2-1' cache ...........................................................................[done]

New repository or package signing key received:

  Repository:       opennms
  Key Name:         OpenNMS Signing Key 2012 (1024-bit) <>
  Key Fingerprint:  79564AEB 7CC6C014 88E7C647 57801F6F 5B9EFD43
  Key Created:      Mon Jan 26 21:40:16 2015
  Key Expires:      (does not expire)
  Subkey:           2C1CAE48E7D60480 2012-01-22 [does not expire]
  Rpm Name:         gpg-pubkey-5b9efd43-54c6a630

Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): a

Install JICMP and JICMP6

sudo zypper install
sudo zypper install

Install OpenNMS Horizon

sudo zypper install opennms

Set OpenJDK 11 environment

cd /opt/opennms/bin
./runjava -s

The output should look like the following:

runjava: Looking for an appropriate JVM...
runjava: Checking for an appropriate JVM in JAVA_HOME...
runjava: Skipping... JAVA_HOME not set.
runjava: Checking JVM in the PATH: "/etc/alternatives/java"...
runjava: Did not find an appropriate JVM in the PATH: "/etc/alternatives/java"
runjava: Searching for a good JVM...
runjava: /opt/opennms/bin/ failed to find a valid JDK. Falling back to the old algorithm.
runjava: Found a good JVM in "/usr/lib64/jvm/java/bin/java".
runjava: Value of "/usr/lib64/jvm/java/bin/java" stored in configuration file.

Configure PostgreSQL access

sudo vi /opt/opennms/etc/opennms-datasources.xml

Set credentials for the opennms database and for postgres admin user

<jdbc-data-source name="opennms"
                  password="opennms" />

<jdbc-data-source name="opennms-admin"
                  password="postgres-root-password" />

Initialize OpenNMS Horizon database

cd /opt/opennms/bin
sudo ./install -dis

Start OpenNMS Horizon and enable startup on system boot

sudo systemctl enable --now opennms

:tipping_hand_woman: When you get the error message:

Synchronizing state of opennms.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable opennms
/sbin/insserv: No such file or directory

the insserv-compat is missing and you have skipped this step in this guide above.

Configure firewall for access to the web interface

sudo firewall-cmd --zone=public --add-port=8980/tcp --permanent

Optional: If you want to receive SNMP Traps and Syslog messages

sudo firewall-cmd --zone=public --add-port=162/udp --permanent
sudo firewall-cmd --zone=public --add-port=514/udp --permanent

Reload the firewall with

sudo firewall-cmd --reload

Login to the web interface http://your-server-ip:8980/opennms with admin/admin.

gl & hf

:woman_facepalming: You can fix me, Iā€™m a wiki post.