2015-07-21
This works with the provided mongodb and openjdk7 packages. Mongodb depends on LC_ALL being set to ‘C’, which is not the default.
After symlinking /opt/local/bin/mongod to /opt/local/UniFi, there is no need to enable the mongodb service using SMF; UniFi’s ace.jar does it for you (via the symlink).
pkgin -y install openjdk7 mongodb
curl -OL http://dl.ubnt.com/unifi/4.6.6/UniFi.unix.zip
/opt/local/unzip -o Unifi.unix.zip -d /opt/local
cd /opt/local/UniFi/bin && ln -s /opt/local/bin/mongod mongod
svcadm enable unifi
.