Install and Configure Fink
If you don't have Fink installed or Fink is not configured to use the unstable packages tree, read the Fink install page for information on installing Fink for your release of Mac OS X.
Enable the "Unstable" Tree
Next, configure fink to use "unstable" packages. Edit
/sw/etc/fink.conf (as root) and add the unstable packages to the Trees line:
Trees: local/main stable/main unstable/main
...and then run:
# or fink selfupdate-cvs fink selfupdate-rsync fink scanpackages
Preparing the Database for OpenNMS
Before installing OpenNMS itself, you will want to install PostgreSQL, and do a few things to make sure PostgreSQL is working properly.
First, you'll want to install PostgreSQL. To install, just run the "
fink install postgresql-server" command:
fink install postgresql-server
Onec PostgreSQL is installed, the first thing you'll need to do is making sure PostgreSQL starts up properly. On most distributions, you can just run (as root):
Then, to ensure that PostgreSQL will start after a reboot, use the "
daemonic" command to enable start on bootup:
/sw/bin/daemonic enable postgresql91
Additionally, while it's beyond the scope of this beginning tutorial, you may want to check the PostgreSQL section of the Performance Tuning page to get the most out of your database installation.
If, during startup, the PostgreSQL script complains that you need more shared memory, it will create a sample
sysctl.conf file for you in the /etc directory. If you don't have an "
/etc/sysctl.conf" file already, just move the "
/etc/sysctl.conf.pg" file over. Otherwise, merge the contents with your existing sysctl.conf.
You will have to reboot for these changes to take effect.
Then, ensure that the shmmax is set correctly:
sysctl -a | grep shm
Installing the Latest Official Release Through Fink
OpenNMS is kept up-to-date in Fink. All you need to do is:
fink selfupdate fink install opennms
If you choose the defaults, fink should install $OPENNMS_HOME into /sw/var/opennms.
Next, you need to tell OpenNMS which Java you want it to use, using the "
In most cases, you should be able to point it at /Library/Java/Home:
$OPENNMS_HOME/bin/runjava -S /Library/Java/Home/bin/java
Create/Update the OpenNMS Database
Whenever you install OpenNMS or upgrade it, you should run the "
$OPENNMS_HOME/bin/install" command, to create the OpenNMS database, or update it to the latest version. The install command takes many options, but in most cases all you should need is:
- -d - to update the database
- -i - to insert any default data that belongs in the database
- -s - to create or update the stored procedures OpenNMS uses for certain kinds of data access
(Optional) Configure IPLIKE
OpenNMS uses a PostgreSQL stored procedure called "IPLIKE" which provides an API for easily performing complicated IP address queries. By default, OpenNMS installs a version of IPLIKE that is compatible with all versions of PostgreSQL, but there is a platform-specific version of IPLIKE with much better performance. While it is optional, it is recommended that you install the "
iplike-pg91" package for performance reasons.
Start OpenNMS and Connect to the Web UI
You can now start OpenNMS using the "opennms" command (as root):