When installing the client, the package and server are the same, but the Configure configuration parameters are different.
Add users, user groups, unpack packages
The code is as follows |
Copy Code |
[ROOT@LOGSEC/USR/LOCAL/SRC] #groupadd Zabbix-g 201 [ROOT@LOGSEC/USR/LOCAL/SRC] #useradd-G zabbix-u 201-m Zabbix [ROOT@LOGSEC/USR/LOCAL/SRC] #tar-XVF zabbix-2.0.5.tar.gz |
Compile and install Zabbix agent
The code is as follows |
Copy Code |
#cd zabbix-2.0.5/ [root@logsec/usr/local/src/zabbix-2.0.5] #./configure--prefix=/usr/local/zabbix--enable-agent [root@logsec/usr/local/src/zabbix-2.0.5] #make Install [root@logsec/usr/local/src/zabbix-2.0.5] #mkdir/var/log/zabbix [root@logsec/usr/local/src/zabbix-2.0.5] #chown-R zabbix.zabbix/var/log/zabbix/ |
Configuration, replication related configuration
The code is as follows |
Copy Code |
[root@logsec/usr/local/src/zabbix-2.0.5] #cp misc/init.d/fedora/core/zabbix_agentd/etc/init.d/ [root@logsec/usr/local/src/zabbix-2.0.5] #chmod 755/etc/init.d/zabbix_agentd [root@logsec/usr/local/src/zabbix-2.0.5] #sed-i "s#basedir=/usr/local#basedir=/usr/local/zabbix#g"/etc/init.d/zabbix_agentd [root@logsec/usr/local/src/zabbix-2.0.5] #ln-S/usr/local/zabbix/etc/etc/zabbix [root@logsec/usr/local/src/zabbix-2.0.5] #ln-S/usr/local/zabbix/bin/*/usr/bin/ [root@logsec/usr/local/src/zabbix-2.0.5] #ln-S/usr/local/zabbix/sbin/*/usr/sbin/ |
Registering service ports
code is as follows |
copy code |
#vim/etc/services Zabbix-agent 10050/tcp #Zabbix Agent Zabbix-agent 10050/UDP #Zabbix Agent Zabbix-trapper 10051/tcp #Zabbix Trapper Zabbix-trapper 10051/udp #Zabbix Trappe |
Modify agent configured as server IP
The code is as follows |
Copy Code |
Sed-i "S/server=127.0.0.1/server=172.16.100.80/g"/etc/zabbix/zabbix_agentd.conf Sed-i "S/server=127.0.0.1/server=172.16.100.80/g"/etc/zabbix/zabbix_agent.conf Sed-i "S/serveractive=127.0.0.1/serveractive=172.16.100.80/g"/etc/zabbix/zabbix_agentd.conf Sed-i "S#tmp/zabbix_agentd.log#var/log/zabbix/zabbix_agentd.log#g"/etc/zabbix/zabbix_agentd.conf Sed-i "#UnsafeUserParameters =0#aunsafeuserparameters=1n"/etc/zabbix/zabbix_agentd.conf |
Set the agent to boot
The code is as follows |
Copy Code |
[root@logsec/usr/local/src/zabbix-2.0.5] #chkconfig Zabbix_agentd on [root@logsec/usr/local/src/zabbix-2.0.5] #service Zabbix_agentd Start Starting ZABBIX_AGENTD: [OK] |
Add hosts, and apply templates
Host is the basic carrier of Zabbix monitoring, all the monitoring items are based on host.
To create a monitoring device by Configuration->hosts->create Host
Click on the top right corner
After the completion of the add as shown