See www.zabbix.com for the official Zabbix site.
From source archives
For compilation from source archives (released versions or nightly builds), please see the official installation instructions:
3.2- not supported anymore
2.4- not supported anymore
2.0- not supported anymore
1.8- not supported anymore
From SVN checkout
Compiling Zabbix from SVN checkout is slightly different and more complex than doing the same from a released package.
Make sure you have got pkg-config installed prior running bootstrap.sh, or you will receive an error like this:
./configure: line 8092: syntax error near unexpected token `IKSEMEL,iksemel,'
Generating configure script
configure, run :
At this point, you can run
configure and compile Zabbix directly in the checkout directory. Read below for a suggested approach instead.
Generating database-specific files
Zabbix uses database-independent template files to define database schema and data. To generate actual SQL files as well as dbschema.c file, run:
If this is not done, you will get an error message like this:
make: *** No rule to make target `dbschema.c', needed by `libzbxdbhigh_a-dbschema.o'. Stop.
Generating frontend CSS files
Since Zabbix 3.0, CSS files, used in the frontend, must be generated:
Our Jenkins test for SCSS can fail because different versions of "sass" produce different output, so there is a solution to standardize the version of the "sass" utility that we use.
To set up the version of "sass" used by Jenkins tests, install Ruby and then use the "gem" command, like so:
$ sudo gem install sass --version '=3.4.22'
This will install a specific version of "sass" into /usr/local/bin/.
Creating source archive
It is suggested to create source archive, just like the one that can be downloaded from the official pages. If you like a clean checkout, copy it first to some other directory for package creation purposes. To do this more than once,
rsync will be helpful, as less files will have to be copied in the consequent runs:
mkdir /tmp/zabbix rsync -r -l --exclude='*/.svn*' trunk /tmp/zabbix
Unfortunately, to do this,
configure script has to be run, thus the machine will need at least the basic dependencies, needed for actual Zabbix compilation. To reduce amount of libraries needed, run configure without any parameters:
This should complete without errors. If it doesn't, resolve missing dependencies. Next we have to generate database schema files:
And then comes actual distribution package step:
This should leave you with zabbix-<version>.tar.gz file in the /tmp/zabbix/trunk directory, for example, /tmp/zabbix/trunk/zabbix-1.9.7.tar.gz.
For Zabbix trunk (1.9 versions since revision 15656), it is necessary to generate translation files if you wish to use other languages but English. To do that, run:
msgfmt from gettext package is required to generate mo files.
Creating database patch
If all you need from a development branch is the database patch, you don't have to build a full package, it is enough to execute:
cd upgrades/dbpatches/<version>/<database> cat patch/* > patch.sql
For example, if creating a MySQL patch for 2.0:
cd upgrades/dbpatches/2.0/mysql cat patch/* > patch.sql