Installing Official Zabbix Agent/Server from deb sources

Miguel Martín
Systems Administrator at OpenSistemas

After the new release of Zabbix 3.0.0 i was in the need of installing updated zabbix agents on my Kurobox, Raspberry Pi and Mac Mini boxes. The problem here is that the official debian repositories, even the experimental one, have older versions and, in the other side, the official Zabbix repo is only built for intel architectures, so we have to compile it from sources.

The first thing you need to do is import official GPG key in your debian box:

wget -O - "" | apt-key add -

Then add official debian sources repository to your apt sources list in /etc/apt/sources.list.d/zabbix.list :

echo "deb-src jessie main" > /etc/apt/sources.list.d/zabbix.list

Next step is to install debian devel tools that will allow us to generate the debian packages:

apt-get install build-essential devscripts debhelper

To build zabbix we will need to install the build dependencies as well:

apt-get build-dep zabbix

At this point, if you don’t java-sdk installed you may have an error saying that there is no provider of ‘java-sdk’. This is because ‘java-sdk’ is a virtual package provided by several real packages. Installing one of them will solve the problem:

apt-get install default-jdk && apt-get build-dep zabbix

The last thing we need is zabbix sources itself:

mkdir zabbix; cd zabbix; apt-get source zabbix

Now we have all we need to build official zabbix debian packages.

cd zabbix-3.0.0; debuild -us -uc

Once finished we will have zabbix packages in the parent directory:

cd .. ; dpkg -i zabbix-agent_3.0.0-1+jessie_powerpc.deb