Install via brew:
sudo brew install nagios
may need to chown a few things...
sudo chown root /usr/local/bin/brew
First we need to create a command dir using superhuman powers:
mkdir -p /usr/local/var/lib/nagios/rw
sudo chgrp _www /usr/local/var/lib/nagios/rw
sudo chmod 2775 /usr/local/var/lib/nagios/rw
Then install the Nagios web frontend into Apple's build-in Apache:
-
Turn on Personal Web Sharing.
-
Load the php module by patching /etc/apache2/httpd.conf:
-#LoadModule php5_module libexec/apache2/libphp5.so
+LoadModule php5_module libexec/apache2/libphp5.so
3. Symlink the sample config and create your web account:
sudo ln -sf /usr/local/Cellar/nagios/3.5.0/share/nagios.conf /etc/apache2/other/
htpasswd -cs /usr/local/etc/nagios/htpasswd.users nagiosadmin
sudo apachectl restart
Log in with your web account (and don't forget to RTFM :-)
open http://localhost/nagios
To have launchd start nagios at startup:
sudo cp -fv /usr/local/opt/nagios/*.plist /Library/LaunchDaemons
Then to load nagios now:
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nagios.plist
Or, if you don't want/need launchctl, you can just run:
nagios /usr/local/etc/nagios/nagios.cfg
thanks! updated.