Base on Nick Anderson’s post Zabbix 1.4.4 from source on Debian Etch this is a simple guide line to compile and install Zabbix agent on a Debian (Etch) machine.
Create Zabbix user and group:
groupadd zabbix useradd -c 'Zabbix' -d /home/zabbix -g zabbix -s /bin/bash zabbix mkdir /home/zabbix chown zabbix:zabbix /home/zabbix
Download Zabbix source (version 1.6.2 here):
su - zabbix wget http://dfn.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.6.2.tar.gz tar zxvf zabbix-1.6.2.tar.gz cd zabbix-1.6.2
Compile it:
./configure --prefix=/usr --enable-agent make exit cd /home/zabbix/zabbix-1.6.2 make install
Update /etc/services:
echo " zabbix_agent 10050/tcp # Zabbix ports zabbix_trap 10051/tcp" >> /etc/services
Copy the config files:
mkdir -p /etc/zabbix chown -R zabbix:zabbix /etc/zabbix cp misc/conf/zabbix_agent* /etc/zabbix
Edit the config file (set the server IP address):
nano /etc/zabbix/zabbix_agentd.conf
Copy the init.d script and edit it, setting the right DAEMON path to /usr/sbin/${NAME}:
cp /home/zabbix/zabbix-1.6.2/misc/init.d/debian/zabbix-agent /etc/init.d/ nano /etc/init.d/zabbix-agent
Update the startup links and let the agent to sartup automatically:
update-rc.d zabbix-agent defaults 90
Start the agent!
/etc/init.d/zabbix-agent start
If you have a firewall running, remember to update its policies to allow traffic from and to the Zabbix server!