Installing on FreeBSD 10.x with OpenJDK

From OpenNMS
Jump to navigation Jump to search

Work In Progress

This article is a work in progress, and as a result may change without notice.

For more information on the current state of this page, ask user Ppathiakis

Last Revision: 20 March 2016 18:20

Installing OpenNMS 15 on FreeBSD 10.x

This article covers a work in progress at this point in time. OpenNMS makes extensive use of Java and many of the cutting edge features of it. At this point in time, this procedure is put in place, knowing that it does not work, but to let people know how far it has progressed and that it is being worked on.

Note that if you are able to test and are good with bug reports, please let us know on the opennms-devel mailing list. We don't have anyone in-house who works with FreeBSD, it would be better to have someone in the community who's able to help work with the FreeBSD JDK maintainers to get the blocker bug(s) fixed.


First, browse to the location of the OpenNMS GUI installer and download it. (It requires an X-server to display)

In a browser, go to:

Enter that directory.

Look for the zip file containing the installer.

It should be labeled similar: standalone-opennms-install-<version>.zip

Either click on the hyperlink to go to the download page or ftp to the direct link with this command:

ftp '<version>/standalone-opennms-installer-<version>.zip/download'

Get the download working first, the link is slow and you can get the rest of the requirements in place.

The first thing to verify is that the machine you are loading this onto will verify that the hostname is resolvable. That is, it must be the same in either the /etc/hosts file, the DNS resolution and the result returned from the hostname command.

Packages that are available in the repository that will need to be installed:

  • bash
  • postgresql94-server
  • postgresql94-client
  • iplike
  • jicmp
  • jicmp6
  • jrrd
  • openjdk (defaults to 1.7 - No longer supported so be watching for OpenNMS 16 and later which will require OpenJDK 8)

These packages will pull in all the dependencies necessary to run OpenNMS.

Modifications necessary




Initialize PostgreSQL:

/usr/local/etc/rc.d/postgres initdb
/usr/local/etc/rc.d/postgres start

Create the postgres and opennms roles for the database.

su - pgsql
$ createuser -l -d postgres

Create the opennms:

$ createuser opennms

Create the OpenNMS database with the proper encoding, with opennms as the user, as pgsql as the creator, and with a password of opennms:

$ createdb -E UTF8 -O opennms -U pgsql -W opennms

Use the OpenNMS install program. It really takes a lot of the tedium away from the startup.

First, as the desktop user, allow X communications.

xhost +

If the install is local, when you use the installer as root, set the DISPLAY variable to be :0.0

Change to root:

su -
Password:  <your root password>

For sh variants:

export DISPLAY=:0.0

Or for csh variants:

setenv DISPLAY :0.0


Once the installer has completed downloading, unzip it.

unzip standalone-opennms-installer-<version>

This will create a subdirectory opennms-installer. Enter that directory.

cd opennms-installer

Run the jar file to install:

java -jar standalone-opennms-installer-<version>-1.jar

The Install GUI window should appear.

  1. Step: Information
    Click: Next
  2. Step: Licensing Agreements
    Click: Radio button for 'I accept the terms of this license agreement.'
    Click: Next
  3. Where's Step 3?
    It's not in the installer, you'll be prompter with Step 4 instead
  4. Step: Target Path
    Enter installation path: /usr/local/OpenNMS
    Click: Next
    A pop-up will appear with the message that /usr/local/OpenNMS target directory will be created.
    Click: OK
  5. Step: Select Installation Packages
    (Minimally) Select Core and Docs (You can select others is so inclined.)
    Click: Next
  6. Step: User Data
    Database Host: localhost
    PostgreSQL Database Name: opennms
    Database Port: 5432
    Database Username (Administrator): pgsql
    Database Password (Administrator): <leave blank>
    Database Username (Runtime): opennms
    Database Username (Runtime): opennms
    Click: Next
  7. Step: User Data - Configure Discovery Range
    Start: <leave blank>
    End: <leave blank>
    (Or: configure for your local network to limit the discovery process)
    Click: Next
  8. Step: Installation
    ( this step extracts and installs into the target directory /usr/local/OpenNMS )
    NOTE: if you have an issue with connecting to or installing the database or users in the database. it must be corrected before proceeding.
    Click: Next
  9. Step: Perform External Processes
    ( this steps runs '/usr/local/OpenNMS/bin/install -dis' )
    Click: Next
  10. Step: Installation Finished
    Click: Done

Modify the start up file for OpenNMS. It has the path to bash as being /bin/bash when it should be /usr/local/bin/bash on FreeBSD.

vi /usr/local/OpenNMS/bin/opennms

Change #!/bin/bash to #!/usr/local/bin/bash

Quit while saving out the change.

Fix for NMS-7464

rm /usr/local/OpenNMS/jetty-webapps/opennms-remoting/WEB-INF/lib/org.opennms.core.soa-15.0.1.jar
/usr/local/OpenNMS/bin/opennms start

OpenNMS Login / Failure

  • Open a web browser to <opennms-host-ipaddr>:8980
  • Login using admin for noth the username & password.
    • need doc on setting up a requisition & single node
  • Wait for the JDK to crash and dump an hs_err_pid<pid>.log and core file.
  • OK, you may not want to wait too long. The latest versions of 1.17 and OpenJDK 8 take over 24 hours to crash