1
2
3
4
5
|
[root@localhost ~]
# useradd zabbix
[root@localhost ~]
# mkdir /usr/local/zabbix_agentd
[root@localhost ~]
# tar zxvf zabbix_agents_2.2.0.linux2_6.amd64.tar.gz -C /usr/local/zabbix_agentd
[root@localhost ~]
# cd /usr/local/zabbix_agentd/
[root@localhost zabbix_agentd]
# cp conf/zabbix_agentd.conf /usr/local/etc/
|
1
2
3
|
[root@localhost ~]
# vi /usr/local/etc/zabbix_agentd.conf
Hostname=localhost
#本机主机名
Server=192.168.1.153
#zabbix服务端IP
|
1
2
3
|
[root@localhost zabbix_agentd]
# cp sbin/zabbix_agentd /etc/init.d/
[root@localhost zabbix_agentd]
# /etc/init.d/zabbix_agentd start
[root@localhost ~]
# echo "/etc/init.d/zabbix_agentd start" >> /etc/rc.local #开机启动
|
1
2
|
[root@localhost zabbix_agentd]
# netstat -tupln | grep 10050
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 1780
/zabbix_agentd
|
1
2
|
[root@localhost]
# zabbix_get -s 127.0.0.1 -p 10050 -k system.uptime
27274
|