I wanted a local copy of Zabbix to test and hack on, so I installed it on my mac. It's not as brain-dead easy as it should be, so here are the steps.
This couldn't be easier. Go and download the click-through installer. Choose all the defaults and let it do its thing. It'll make you restart your computer. Remember the superuser password you enter at this step.
For this step, you'll need to install Apple's developer tools.
Go download the Zabbix sources and untar them.
Navigate to the directory and run the
configure command. Depending on what strikes your fancy, you might enable more options like
$ ./configure --enable-server --with-pgsql=/Library/PostgreSQL/8.3/bin/pg_config --with-net-snmp --with-libcurl --prefix=$$HOME/Library/Zabbix
Unfortunately it won't compile on Mac OS X. Fortunately this guy figured out why.
include/common.h and right after the following line...
...add this line...
#define MAXDNAME 2048
include/sysinc.h and replace this line...
...with this line...
Now build it...
$ make -j3
And install it...
$ make install
Create a new database user. Choose a database user password. I chose
$ /Library/PostgreSQL/8.3/bin/createuser zabbix --no-superuser --createdb --no-createrole --pwprompt -U postgres Enter password for new role: <database user password> Enter it again: <database user password> Password: <superuser password>
$ /Library/PostgreSQL/8.3/bin/createdb zabbix -U zabbix -W Password: <database user password>
Populate the database with tables and data...
$ cat create/schema/postgresql.sql | /Library/PostgreSQL/8.3/bin/psql -U zabbix -W Password for user zabbix: <database user password> ...
$ cat create/data/data.sql | /Library/PostgreSQL/8.3/bin/psql -U zabbix -W Password for user zabbix: <database user password> ...
$ cat create/data/images_pgsql.sql | /Library/PostgreSQL/8.3/bin/psql -U zabbix -W Password for user zabbix: <database user password> ...
$ mkdir ~/Library/Zabbix/etc $ cp misc/conf/zabbix_server.conf ~/Library/Zabbix/etc/
~/Library/Zabbix/etc/zabbix_server.conf. Leave everything as default, but change the following two values...
Start the zabbix server...
MAMP is the quickest way to get a full-blown Apache up and running with PHP5. Download it here and install the regular (non-pro) version.
Configure PHP by editing
max_execution_time = 300
Then go to the bottom of the file and add your timezone
date.timezone = America/Vancouver
Install the Zabbix front-end so MAMP can serve it
$ mv frontends/php ~/Library/Zabbix/frontend $ ln -s ~/Library/Zabbix/frontend /Applications/MAMP/htdocs/zabbix
Double-click the main MAMP application and see that the servers start up.
Navigate to http://localhost:8888/zabbix/
Go through the configuration screens.
On the database screen, choose PostgreSQL, set the username to "zabbix" and the password to whatever database user password you chose.
On the zabbix server details screen, set the port to 8888.
You can now log on in with the username/password of Admin/zabbix
This is a test installation on my home network, so I've foregone best practices for security and reliability. If you are relying on this zabbix installation for a production environment, you should consider taking some precautions...