Installation:MacOSX
From OpenNMS
OpenNMS is supported on Mac OS X (Darwin) via Ben Reed at the Fink project.
Contents |
Preparing Your System
First you need to install Fink, and get all of the requisite dependencies and packages installed.
Fink Installation
If you don't have Fink installed or Fink is not configured to use the unstable packages tree, read the Fink install page.
Then, configure fink to use the unstable packages. Edit /sw/etc/fink.conf and add the unstable packages to the Trees line:
Trees: local/main stable/main stable/crypto unstable/main unstable/crypto
...and then run:
# or fink selfupdate-cvs fink selfupdate-rsync fink scanpackages
Install OpenNMS
Installing the Latest Official Release Through Fink
OpenNMS is kept up-to-date in Fink. All you need to do is:
# or fink selfupdate-cvs fink selfupdate-rsync fink install opennms
Note: For the rest of these instructions, $OPENNMS_HOME refers to /sw/var/opennms.
Installing from Source
Before installing from source, get the prerequisites:
fink install jicmp rrdtool-java iplike-pg82
Get the OpenNMS Code
First, make sure that you have Git installed:
fink install git
Then, follow the instructions on checking out the source code. For example, to get the latest source code, run:
git clone git://opennms.git.sourceforge.net/gitroot/opennms/opennms cd opennms
Or, if you want a specific tagged release, you can check it out as a local branch:
git clone git://opennms.git.sourceforge.net/gitroot/opennms/opennms cd opennms git checkout -b opennms-1.6.1 opennms-1.6.1
Build OpenNMS
Next, built OpenNMS:
./build.sh -Dopennms.home=/sw/opt/opennms install assembly:attached
This can take a while, especially the first time it is run, since the maven build system will need to download a lot of libraries. This may fail for Maven related reasons, one symptom of which could be missing dependencies. If it does fail, try removing all of the contents of ~/.m2/repository and trying again (in fact, consider doing that anyway to save time if you can).
This will place a tarball in the opennms-trunk/target directory, so now unpack it into it's final destination:
cd /sw sudo mkdir -p opt/opennms cd opt/opennms/ sudo tar zxvf ~/rcs/opennms/target/opennms-1.6.1.tar.gz
Note: For the rest of these instructions, $OPENNMS_HOME refers to /sw/opt/opennms.
Startup Configuration
Configure PostgreSQL
Next, edit /sw/var/postgresql-X.X/data/postgresql.conf as described in /sw/share/doc/opennms/README.Darwin. Depending on your PostgreSQL version, the configuration options are slightly different.
Configure Shared Memory (If Necessary)
You may require more shared memory than the kernel wants to give you, so create or edit /etc/sysctl.conf with the lines:
kern.sysv.shmmax=16777216 kern.sysv.shmmin=1 kern.sysv.shmmni=64 kern.sysv.shmseg=8 kern.sysv.shmall=32768
...and reboot. Then, ensure that the shmmax is set correctly:
Or load with (with sudo)
sysctl -w kern.sysv.shmmax=16777216
sysctl -w kern.sysv.shmmin=1
sysctl -w kern.sysv.shmmni=64
sysctl -w kern.sysv.shmseg=8
sysctl -w kern.sysv.shmall=32768
sysctl -a | grep shm
Start PostgreSQL
Next, start PostgreSQL:
sudo /sw/bin/pgsql.sh start
Depending on your PostgreSQL version, you may need to cd into /sw to get this to work, otherwise you'll get:
$ sudo pgsql.sh start could not identify current directory: Permission denied could not identify current directory: Permission denied could not identify current directory: Permission denied The program "postmaster-8.2" is needed by pg_ctl-8.2 but was not found in the same directory as "pg_ctl-8.2".
Set Up the Database
Now you have to set up the database for OpenNMS:
sudo chmod +x $OPENNMS_HOME/bin/* sudo $OPENNMS_HOME/bin/runjava -s sudo $OPENNMS_HOME/bin/install -disl /sw/lib
Edit Your OpenNMS Configuration
Now you should edit the $OPENNMS_HOME/etc/discovery-configuration.xml and $OPENNMS_HOME/etc/snmp-config.xml at the minimum, per the How-To, and then startup OpenNMS:
sudo $OPENNMS_HOME/bin/opennms start
...and point your browser to:
http://[server]:8980/opennms
where server is localhost if running locally and the hostname or IP address of the OpenNMS server if remote.
Installation using MacPorts
Install PostgreSQL
sudo -s port install postgresql83-server launchctl load -w /Library/LaunchDaemons/org.macports.postgresql83-server.plist passwd postgres mkdir -p /opt/local/var/db/postgresql83/opennms chown postgres:postgres /opt/local/var/db/postgresql83/opennms su postgres -c '/opt/local/lib/postgresql83/bin/initdb -D /opt/local/var/db/postgresql83/opennms'
Install and start OpenNMS
Download the latest stable OpenNMS distribution in JAR format Doubleclick the JAR and follow the installation instructions Start OpenNMS
sudo /Applications/OpenNMS/bin/opennms start
Open your browser at http://localhost:8980/opennms. The username and password are "admin".









New Pages