天天看點

CentOS6下編譯安裝zabbix_agent3.0用戶端

安裝Zabbix3.0.5用戶端

添加一台CentOS6.5

主機192.168.137.33

1、添加使用者群組

<code># groupadd -g 201 zabbix</code>

<code># useradd -g zabbix -u 201 -s /sbin/nologin zabbix</code>

2、解壓安裝包,編譯安裝

<code>#tar -zxvf zabbix-3.0.5.tar.gz</code>

<code>#cd zabbix-3.0.5</code>

<code>#./configure --prefix=/usr/local/zabbix --enable-agent </code>

<code># make install</code>

3、修改agentd配置檔案

<code>#vi /usr/local/zabbix/etc/zabbix_agentd.conf</code>

<code>Server= 192.168.137.30         </code><code>#服務端ip位址</code>

<code>ServerActive= 192.168.137.30    </code><code>#服務端ip位址</code>

<code>Hostname=node1             </code><code>#必須與建立主機時的hostname一緻</code>

4、修改啟動配置,添加軟連結

<code># cp ~/zabbix-3.0.5/misc/init.d/tru64/zabbix_agentd /etc/init.d/</code>

<code># chmod +x /etc/init.d/zabbix_ agentd</code>

<code># ln -sv /usr/local/zabbix/sbin/* /usr/local/sbin/</code>

<code># ln -sv /usr/local/zabbix/bin/* /usr/local/bin/</code>

5、設定自啟動

<code># vi /etc/rc.d/init.d/zabbix_ agentd</code>

<code>#在第二行添加</code>

<code>#chkconfig: 2345 10 90</code>

<code>#description: zabbix agent</code>

<code># chkconfig --add zabbix_agentd</code>

<code># chkconfig --list zabbix_agentd</code>

<code> </code><code>zabbix_agentd  0:off1:off2:on3:on4:on5:on6:off</code>

<code># chkconfig zabbix_agentd on</code>

<code># service zabbix_agentd start</code>

6、啟動zabbix web端添加主機node3

步驟:

<a href="http://s4.51cto.com/wyfs02/M01/89/C2/wKioL1gb-ubzMl-GAAB_ho6I5Sw401.png" target="_blank"></a>

<a href="http://s4.51cto.com/wyfs02/M01/89/C4/wKiom1gb-ueAEYhDAABtCMsKbJo553.png" target="_blank"></a>

<a href="http://s4.51cto.com/wyfs02/M01/89/C2/wKioL1gb-ufQwk_FAACUa5ECKBE598.png" target="_blank"></a>

本文轉自 ljohnmail 51CTO部落格,原文連結:http://blog.51cto.com/ljohn/1869264,如需轉載請自行聯系原作者

繼續閱讀