How to Install OpenNMS Horizon 36 on AlmaLinux 9 and Rocky Linux 9
Install OpenNMS Horizon 36 on AlmaLinux 9 or Rocky Linux 9 with PostgreSQL and OpenJDK 21, following the project's official deployment steps.
This guide installs OpenNMS Horizon 36 with PostgreSQL and OpenJDK 21 on a single AlmaLinux 9 or Rocky Linux 9 server. At the end the Horizon core service runs under systemd, the web interface answers on port 8980, and the server is monitoring itself as its first node.
CentOS 7 reached end of life on 30 June 2024 and is no longer a supported platform for Horizon. The project's current requirements list RHEL and CentOS 9 and 10, Debian 11 and 12, and Ubuntu 24.04 LTS. AlmaLinux 9 and Rocky Linux 9 are rebuilds of RHEL 9 and use the same RHEL 9 packages. Older tutorials relied on a separate quick-install script; the steps below follow the official deployment guide directly.
Requirements
- AlmaLinux 9, Rocky Linux 9, RHEL 9 or CentOS Stream 9 on x86_64.
- For a test system: a dual-core CPU, 4 GB of RAM and 50 GB of disk. The documented minimum for a real server is a quad-core CPU and 16 GB of RAM.
- A user with
sudorights (the examples usedeploy), working DNS, and a host name that resolves, on a server at203.0.113.10. - Working time synchronisation.
chronydis enabled by default on these systems; check it withchronyc tracking.
Horizon 36 needs Java 21, PostgreSQL 14 to 18 and RRDtool 1.7. The opennms package pulls in its other dependencies.
Step 1: Set the locale and update the system
sudo dnf install -y langpacks-en glibc-all-langpacks
sudo localectl set-locale LANG=en_US.UTF-8
sudo dnf makecache
sudo dnf update -y
Reboot if a new kernel was installed.
Step 2: Install PostgreSQL
The deployment guide uses PostgreSQL 15 from the PostgreSQL project's own repository. Add the repository, disable the distribution's module so it does not shadow those packages, and initialise the cluster:
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf -qy module disable postgresql
sudo dnf install -y postgresql15-server
sudo /usr/pgsql-15/bin/postgresql-15-setup initdb
sudo systemctl enable --now postgresql-15
Create the opennms role (you are asked for its password twice) and an empty database owned by it:
sudo -i -u postgres createuser -P opennms
sudo -i -u postgres createdb -O opennms opennms
Horizon also needs the PostgreSQL superuser to create and migrate the schema during installation and upgrades. Give postgres a password; the leading space keeps the command out of your shell history on most configurations:
sudo -i -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'YOUR-POSTGRES-PASSWORD';"
Horizon opens up to 70 database connections with its default pools, so max_connections must be at least 70. The PostgreSQL default of 100 is enough for a default installation.
Step 3: Install Java 21
sudo dnf install -y java-21-openjdk-devel
java -version
Step 4: Add the OpenNMS repository and install Horizon
sudo dnf -y install https://yum.opennms.org/repofiles/opennms-repo-stable-rhel9.noarch.rpm
sudo rpm --import https://yum.opennms.org/OPENNMS-GPG-KEY
sudo dnf -y install opennms
Horizon is installed under /opt/opennms. A new Horizon release needs manual steps (configuration merges and a schema migration), so it must not arrive as a side effect of a routine dnf update. Disable the repository until you plan an upgrade:
sudo dnf config-manager --disable opennms-repo-stable-*
On a minimal installation, run sudo dnf install 'dnf-command(config-manager)' first if that sub-command is missing.
Step 5: Store the database credentials
Horizon keeps database passwords in its secure credentials vault rather than in plain text. Add the two accounts from step 2, replacing the last word of each command with the real password:
sudo -u opennms /opt/opennms/bin/scvcli set postgres opennms YOUR-OPENNMS-PASSWORD
sudo -u opennms /opt/opennms/bin/scvcli set postgres-admin postgres YOUR-POSTGRES-PASSWORD
The file /opt/opennms/etc/opennms-datasources.xml refers to these two vault entries. Edit it only if your database runs on another host or uses a different database name.
Step 6: Initialise Horizon
Detect the Java environment and write it to /opt/opennms/etc/java.conf:
sudo /opt/opennms/bin/runjava -s
Create the database schema and record the system libraries in /opt/opennms/etc/libraries.properties:
sudo /opt/opennms/bin/install -dis
The installer must end without errors. If it cannot log in to PostgreSQL, re-check the passwords you stored in step 5.
Optionally set the Java heap in megabytes in /opt/opennms/etc/opennms.conf. The value depends on your workload and the memory of the server; this example gives Horizon 4 GB:
echo "JAVA_HEAP_SIZE=4096" | sudo tee /opt/opennms/etc/opennms.conf
Step 7: Start the service and open the firewall
sudo systemctl enable --now opennms
sudo firewall-cmd --permanent --add-port=8980/tcp
sudo systemctl reload firewalld
Start-up takes a few minutes. Watch progress with:
sudo systemctl status opennms
sudo journalctl -u opennms -f
Step 8: Sign in and change the admin password
Browse to http://203.0.113.10:8980/opennms and sign in with user admin and password admin. Horizon prompts you to change the password straight away; do so. You can change it later under Admin > Change Password.
On first sign-in Horizon tells you that it collects anonymised usage statistics and sends them to stats.opennms.com. Sharing is on by default, and an administrator can switch it off on the admin page.
The default configuration discovers the server itself through 127.0.0.1, so a first node with JVM statistics appears without further work. Create personal accounts for each operator instead of sharing admin, so that acknowledged alarms can be traced to a person.
Horizon is designed to run inside a protected network. Do not expose port 8980 directly to the internet; restrict the firewall rule to your management network or reach the console through a VPN.
Maintenance and troubleshooting
- ICMP permission errors at start-up: with SELinux enforcing, Horizon may not be allowed to open ICMP sockets. The deployment guide has a section on SELinux and ICMP permissions with the policy to add; do not disable SELinux to work around it.
- Service fails right after installation: run
sudo /opt/opennms/bin/runjava -sandsudo /opt/opennms/bin/install -disagain and read their output; a wrong vault password or a stopped PostgreSQL service are the usual causes. - More database connections: if you raise the pool sizes in
opennms-datasources.xml, raisemax_connectionsin/var/lib/pgsql/15/data/postgresql.confto match and restart PostgreSQL. - Upgrades: back up
/opt/opennms/etcand the database, re-enable the repository, upgrade the packages, then follow the upgrade chapter of the deployment guide for the configuration and schema steps before starting the service again. - SNMP traps and syslog: receiving them needs additional listener configuration and firewall rules; see the related topics in the same guide.
Frequently asked questions
What is the difference between Horizon and Meridian?
Horizon is the free community release with frequent major versions. Meridian is the subscription release from The OpenNMS Group with a slower release cadence and longer maintenance. The installation steps are very similar.
Can I use the PostgreSQL version from AppStream instead?
Horizon 36 is compatible with PostgreSQL 14 to 18, so a supported AppStream module stream works as well. Service names and data paths then differ from the ones used here, which follow the official guide.
Is there a container image?
Yes. The project publishes opennms/horizon images and documents a Docker Compose setup with a separate PostgreSQL container, which suits test environments and hosts that already run containers.
Does 4 GB of RAM really suffice?
Only for evaluation. The Java heap, PostgreSQL and the RRD files all compete for memory, and the requirement grows with the number of nodes, collected metrics and flows.