Compiling zabbix-agent on Raspberry Pi (xbian or debian)

First of all You need to install some software for compilation:

apt-get install build-essential

Now, just get sources of zabbix (in this case the latest version is 2.0.6):

wget "http://garr.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.0.6/zabbix-2.0.6.tar.gz"

Unpack it, go to unpacked sources:

tar zxfv zabbix-2.0.6.tar.gz
cd zabbix-2.0.6

Now You need to specify configuration options, mine was like:

./configure --enable-agent --prefix=

And You are ready to compile and to install zabbix-agent on Your system:

make
make install

Also if You need startup scripts follow next steps:

cd misc/init.d/debian #in zabbix source's directory
cp zabbix-agent /etc/init.d/
which zabbix_agentd #outup will be needed to edit zabbix-agent startup script

Open /etc/init.d/zabbix-agent file for edit end edit this line:

DAEMON=/usr/local/sbin/${NAME} #put here output of previous command, i.e /sbin/${NAME}

Last thing to do is to add zabbix user, because zabbix cannot run as root user:

adduser --system zabbix

Now You should be able to start zabbix-agent through init scripts, of course You need to configure zabbix-agent in /etc/zabbix_agent.conf and /etc/zabbix_agentd.conf

After configuration is completed You should be able to start zabbix-agent:

/etc/init.d/zabbix-agent start

If You want to start zabbix-agent automaticaly during boot process You need to run this command:

update-rc.d zabbix-agent defaults

And that’s all.

Tagged with: , , , ,

Leave a Reply