Installation and configuration
Objectives
- 
Install all required OpenNMS Meridian components including PostgreSQL on a single node 
- 
Run Meridian Core and PostgreSQL with the default configuration (which is not optimized to run in production and monitor large networks) - 
By default your time series storage is RRDtool, which persists RRD files on the local file system 
 
- 
- 
Log in to the web UI and change the default admin password 
Requirements
- 
Credentials to access the Meridian repositories 
- 
Linux physical server or a virtual machine running a supported Linux operating system 
- 
Internet access to download the installation packages 
- 
DNS works and localhost and your server’s host name resolve properly 
- 
System user with administrative permissions (sudo) to perform installation 
| Time synchronization is a critical part of operating a monitoring system. Ensure you have a functional time synchronization process running with your operating system. If you are not familiar with this topic, the knowledgebase article Ensure time synchronization for your OpenNMS components is a good starting point. | 
Set up PostgreSQL
sudo dnf -y install postgresql-server postgresqlsudo postgresql-setup --initdb --unit postgresqlsudo systemctl enable --now postgresqlsudo -i -u postgres createuser -P opennms| You must provide a password for the opennmsdatabase user.
         This guide usesYOUR-OPENNMS-PASSWORDas a placeholder.
         Please set a secure password. | 
sudo -i -u postgres createdb -O opennms opennmssudo -i -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'YOUR-POSTGRES-PASSWORD';"| Change YOUR-POSTGRES-PASSWORDto a secure one.
         The superuser is required to be able to initialize and change the database schema for installation and updates. | 
sudo vi /var/lib/pgsql/data/pg_hba.confhost    all             all             127.0.0.1/32            md5(1)
host    all             all             ::1/128                 md5(1)| 1 | Change method from identtomd5for IPv4 and IPv6 on localhost. | 
sudo systemctl reload postgresqlsudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpmsudo yum -y install postgresql12-server postgresql12sudo /usr/pgsql-12/bin/postgresql-12-setup initdbsudo systemctl enable --now postgresql-12sudo -i -u postgres createuser -P opennms| You must provide a password for the opennmsdatabase user.
         This guide usesYOUR-OPENNMS-PASSWORDas a placeholder.
         Please set a secure password. | 
sudo -i -u postgres createdb -O opennms opennmssudo -i -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'YOUR-POSTGRES-PASSWORD';"| Change YOUR-POSTGRES-PASSWORDto a secure one.
         The superuser is required to initialize and change the database schema for installation and updates. | 
sudo vi /var/lib/pgsql/12/data/pg_hba.confhost    all             all             127.0.0.1/32            md5(1)
host    all             all             ::1/128                 md5(1)| 1 | Change method from identtomd5for IPv4 and IPv6 on localhost. | 
sudo systemctl reload postgresql-12Install the Core instance
| For security reasons, Meridian is designed to run within an organization’s protected intranet. Do not expose the web console and login pages directly to the Internet without appropriate isolation controls (for example, a VPN with multi-factor authentication). | 
cat << EOF | sudo tee /etc/yum.repos.d/opennms-meridian.repo
[meridian]
name=Meridian for Red Hat Enterprise Linux and CentOS
baseurl=https://REPO_USER:REPO_PASS@meridian.opennms.com/packages/2021/stable/rhel8(1)
gpgcheck=1
gpgkey=http://yum.opennms.org/OPENNMS-GPG-KEY
EOF
sudo rpm --import https://yum.opennms.org/OPENNMS-GPG-KEY| 1 | Replace the REPO_USERandREPO_PASSwith your Meridian subscription credentials. | 
sudo dnf -y install meridianIf you want time series trending and forecast functions you must install the R project packages. The additional download size for packages is ~390 MB.
sudo dnf -y install epel-release
sudo dnf -y install R-core| Disable the OpenNMS Meridian repository after installation to prevent unwanted upgrades when upgrading other packages on the server. After upgrade, Meridian requires manual steps to upgrade configuration files or migrate database schemas to a new version. We recommend that you exclude the Meridian packages from update except when you plan to perform an upgrade. | 
sudo dnf config-manager --disable meridiansudo dnf -y install tree
tree /opt/opennms -L 1/opt/opennms
├── bin
├── contrib
├── data
├── deploy
├── etc
├── jetty-webapps
├── lib
├── logs -> /var/log/opennms
├── share -> /var/opennms
└── systemcat << EOF | sudo tee /etc/yum.repos.d/opennms-meridian.repo
[meridian]
name=Meridian for Red Hat Enterprise Linux and CentOS
baseurl=https://REPO_USER:REPO_PASS@meridian.opennms.com/packages/2021/stable/rhel7(1)
gpgcheck=1
gpgkey=http://yum.opennms.org/OPENNMS-GPG-KEY
EOF
sudo rpm --import https://yum.opennms.org/OPENNMS-GPG-KEY| 1 | Replace the REPO_USERandREPO_PASSwith your Meridian subscription credentials. | 
sudo yum -y install meridianIf you want time series trending and forecast functions you must install the R project packages. The additional download size for packages is ~390 MB.
sudo yum -y install epel-release
sudo yum -y install R-core| Disable the OpenNMS Meridian repository after installation to prevent unwanted upgrades when upgrading other packages on the server. After upgrade, Meridian requires manual steps to upgrade configuration files or migrate database schemas to a new version. We recommend that you exclude the Meridian packages from update except when you plan to perform an upgrade. | 
sudo yum -y install yum-utils
sudo yum-config-manager --disable meridiansudo yum -y install tree
tree /opt/opennms -L 1/opt/opennms
├── bin
├── contrib
├── data
├── deploy
├── etc
├── jetty-webapps
├── lib
├── logs -> /var/log/opennms
├── share -> /var/opennms
└── systemSet up the Core instance
sudo vi /opt/opennms/etc/opennms-datasources.xml<jdbc-data-source name="opennms"
                    database-name="opennms"(1)
                    class-name="org.postgresql.Driver"
                    url="jdbc:postgresql://localhost:5432/opennms"
                    user-name="** YOUR-OPENNMS-USERNAME **"(2)
                    password="** YOUR-OPENNMS-PASSWORD **" />(3)
<jdbc-data-source name="opennms-admin"
                    database-name="template1"
                    class-name="org.postgresql.Driver"
                    url="jdbc:postgresql://localhost:5432/template1"
                    user-name="postgres"(4)
                    password="** YOUR-POSTGRES-PASSWORD **" />(5)| 1 | Set the database name Meridian should use. | 
| 2 | Set the user name to access the opennms database table. | 
| 3 | Set the password to access the opennms database table. | 
| 4 | Set the postgres user for administrative access to PostgreSQL. | 
| 5 | Set the password for administrative access to PostgreSQL. | 
sudo /opt/opennms/bin/runjava -ssudo /opt/opennms/bin/install -disMeridian runs as a non-root user, which requires having a Linux kernel greater than 3.10. If you run on an older kernel, and are unable to upgrade your OS, you need to assign CAP_NET_RAW capabilities:
Run systemctl edit --full opennms.service and add the following lines to the [Service] section:
CapabilityBoundingSet=CAP_NET_RAW
AmbientCapabilities=CAP_NET_RAWReload the sytemd unit with systemctl daemon-reload and restart the service with systemctl restart opennms.
(For more background on this issue, see H29+ won’t start with permission error to open ICMP socket on Discourse.)
sudo systemctl enable --now opennmssudo firewall-cmd --permanent --add-port=8980/tcp
sudo systemctl reload firewalld| To receive SNMP Traps or Syslog messages you must allow incoming traffic on your host firewall as well. By default, the OpenNMS Meridian SNMP trap daemon listens on 162/udp and the Syslog daemon listens on 10514/udp. The SNMP Trap daemon is enabled by default, the OpenNMS Syslog daemon is disabled. | 
First login
After you start the Meridian Core services, access the web application at
http://core-instance-ip:8980/opennms.
The default login and password is admin.
| Immediately change the password to a secure one. | 
- 
Open http://core-instance-ip:8980/opennmsin your web browser.
- 
Log in with with admin/admin. 
- 
Click admin → Change Password in the navigation bar. 
- 
Use admin as the current password then type and confirm a new password in the appropriate boxes. 
- 
Click Submit. 
- 
Log out, then log in with your new password.