If you aren’t going to be using Web Monitoring, you can exclude libcurl3-dev from above.
Log into your server as root.
1 – Make the zabbix user and group:
adduser zabbix
enter in new password
confirm
use the remaining defaults.
Add zabbix to the admin group: adduser zabbix adm
2 – Download and Untar the sources: su - zabbix
cd ~
wget http://optusnet.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.6.tar.gz
tar zxvpf zabbix-1.6.tar.gz
You might want to confirm that this is actually the latest version. You might also want to find a mirror closer to you by going to http://sourceforge.net/project/showfiles.php?group_id=23494.
3 – Configure, compile and install the server: cd zabbix-1.6/
./configure --prefix=/usr --enable-proxy --enable-agent --with-sqlite3 --with-net-snmp --with-libcurl && make
su
make install
4 – Prepare the rest of the system: nano /etc/services
Add at the end: zabbix_agent 10050/tcp # Zabbix ports
zabbix_trap 10051/tcp
Save and exit.
5- Create the configuration directories and copy the default files in mkdir /etc/zabbix
chown -R zabbix.zabbix /etc/zabbix/
cp misc/conf/zabbix_proxy.conf /etc/zabbix/
cp misc/conf/zabbix_agentd.conf /etc/zabbix/
Edit the agent’s configuration: nano /etc/zabbix/zabbix_agentd.conf
Make sure that the Server parameter points to the proxy’s address. use the REAL IP, not loopback for this. Server=127.0.0.1
Save and exit.
Edit /etc/zabbix/zabbix_proxy.conf: nano /etc/zabbix/zabbix_proxy.conf
For small sites, most the parameters will work fine. Iif you are into tweaking your config for your 10+ hosts, you may want to use mysql instead of sqlite, and/or edit these parameters.
Change the caps parameters: # IP address (or hostname) of ZABBIX servers.
Server=MASTER_ZABBIX_SERVER_IP
# Database name
DBName=/home/zabbix/zabbix.db
# Unique hostname.
Hostname=MACHINE_HOST_NAME
Save and exit. 6- make init.d startup scripts
Copy the init.d scripts to the right spot: (this uses the server’s init script. we rename it, and will modify it to start the proxy service instead. cp misc/init.d/debian/zabbix-server /etc/init.d/zabbix-proxy
cp misc/init.d/debian/zabbix-agent /etc/init.d
You need to edit these script files as the compiled versions of the zabbix files is placed under /usr/sbin (/usr/bin in older versions).
configure the proxy service script nano /etc/init.d/zabbix-proxy
Make it look like this: NAME=zabbix_proxy
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
DAEMON=/usr/sbin/${NAME}
DESC="Zabbix proxy daemon"
PID=/var/tmp/$NAME.pid
Save and exit.
now edit the agent startup script nano /etc/init.d/zabbix-agent
Change this line: DAEMON=/home/zabbix/bin/${NAME}
replace it with: DAEMON=/usr/sbin/${NAME} (old versions use /usr/bin/${NAME})
Save and exit.
Now set the correct permissions and set ZABBIX to start when the machine boots: chmod 755 /etc/init.d/zabbix-proxy
update-rc.d zabbix-proxy defaults
chmod 755 /etc/init.d/zabbix-agent
update-rc.d zabbix-agent defaults 7- Test it out.
Start the server : /etc/init.d/zabbix-proxy start
Start the agent: /etc/init.d/zabbix-agent start
Now check to make sure that they are running: ps -aux | grep zabbix
You should see multiple instances of zabbix_proxy and zabbix_agentd running if everything has gone ok. If not, check /tmp/zabbix_proxy.log for errors. On your zabbix server, go to configuration-> Hosts. From the dropdown box in the upper-right corner, select “proxies”. then click the “create proxy” button. Use the same EXACLTY as you entered it in the “zabbix-proxy.conf” file.
Zabbix 1.6 Proxy on Debian (sqlite)
Verified to work on Debian 4.0r4 with Zabbix version 1.6 on October 9, 2008.
Install pre-requisites: Net-Snmp libraries, Curl libraries, SQLite, fping.
apt-get install build-essential snmp libsnmp-dev snmpd libcurl3-dev fping curl sqlitelibsqlite3-dev ntpdateIf you aren’t going to be using Web Monitoring, you can exclude libcurl3-dev from above.
Log into your server as root.
1 – Make the zabbix user and group:
adduser zabbixenter in new password
confirm
use the remaining defaults.
Add zabbix to the admin group:
adduser zabbix adm2 – Download and Untar the sources:
su - zabbixcd ~
wget http://optusnet.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.6.tar.gz
tar zxvpf zabbix-1.6.tar.gz
You might want to confirm that this is actually the latest version. You might also want to find a mirror closer to you by going to http://sourceforge.net/project/showfiles.php?group_id=23494.
3 – Configure, compile and install the server:
cd zabbix-1.6/./configure --prefix=/usr --enable-proxy --enable-agent --with-sqlite3 --with-net-snmp --with-libcurl && make
su
make install
4 – Prepare the rest of the system:
nano /etc/servicesAdd at the end:
zabbix_agent 10050/tcp # Zabbix portszabbix_trap 10051/tcp
Save and exit.
5- Create the configuration directories and copy the default files in
mkdir /etc/zabbixchown -R zabbix.zabbix /etc/zabbix/
cp misc/conf/zabbix_proxy.conf /etc/zabbix/
cp misc/conf/zabbix_agentd.conf /etc/zabbix/
Edit the agent’s configuration:
nano /etc/zabbix/zabbix_agentd.confMake sure that the Server parameter points to the proxy’s address. use the REAL IP, not loopback for this.
Server=127.0.0.1Save and exit.
Edit /etc/zabbix/zabbix_proxy.conf:
nano /etc/zabbix/zabbix_proxy.confFor small sites, most the parameters will work fine. Iif you are into tweaking your config for your 10+ hosts, you may want to use mysql instead of sqlite, and/or edit these parameters.
Change the caps parameters:
# IP address (or hostname) of ZABBIX servers.Server=MASTER_ZABBIX_SERVER_IP
# Database name
DBName=/home/zabbix/zabbix.db
# Unique hostname.
Hostname=MACHINE_HOST_NAME
Save and exit.
6- make init.d startup scripts
Copy the init.d scripts to the right spot: (this uses the server’s init script. we rename it, and will modify it to start the proxy service instead.
cp misc/init.d/debian/zabbix-server /etc/init.d/zabbix-proxycp misc/init.d/debian/zabbix-agent /etc/init.d
You need to edit these script files as the compiled versions of the zabbix files is placed under /usr/sbin (/usr/bin in older versions).
configure the proxy service script
nano /etc/init.d/zabbix-proxyMake it look like this:
NAME=zabbix_proxyPATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
DAEMON=/usr/sbin/${NAME}
DESC="Zabbix proxy daemon"
PID=/var/tmp/$NAME.pid
Save and exit.
now edit the agent startup script
nano /etc/init.d/zabbix-agentChange this line:
DAEMON=/home/zabbix/bin/${NAME}replace it with:
DAEMON=/usr/sbin/${NAME} (old versions use /usr/bin/${NAME})Save and exit.
Now set the correct permissions and set ZABBIX to start when the machine boots:
chmod 755 /etc/init.d/zabbix-proxyupdate-rc.d zabbix-proxy defaults
chmod 755 /etc/init.d/zabbix-agent
update-rc.d zabbix-agent defaults
7- Test it out.
Start the server :
/etc/init.d/zabbix-proxy startStart the agent:
/etc/init.d/zabbix-agent startNow check to make sure that they are running:
ps -aux | grep zabbixYou should see multiple instances of zabbix_proxy and zabbix_agentd running if everything has gone ok. If not, check /tmp/zabbix_proxy.log for errors. On your zabbix server, go to configuration-> Hosts. From the dropdown box in the upper-right corner, select “proxies”. then click the “create proxy” button. Use the same EXACLTY as you entered it in the “zabbix-proxy.conf” file.