1. 程式人生 > >linux和windos7 zabbix ageent 客戶端安裝_2018_lcf

linux和windos7 zabbix ageent 客戶端安裝_2018_lcf

一、linux 安裝

[[email protected] lnmp_soft]# tar -xf zabbix-3.4.4.tar.gz
[[email protected] lnmp_soft]# cd zabbix-3.4.4/
[[email protected] zabbix-3.4.4]# ./configure  --enable-proxy --enable-agent

[[email protected] ~]# vim /usr/local/etc/zabbix_agentd.conf
Server=127.0.0.1,192.168.2.5                    //允許哪些主機監控本機
ServerActive=127.0.0.1,192.168.2.5                //允許哪些主機通過主動模式監控本機
Hostname=zabbix_server                        //設定本機主機名
LogFile=/tmp/zabbix_server.log                    //設定日誌檔案
UnsafeUserParameters=1                        //是否允許自定義key
[
[email protected]
~]# zabbix_agentd            //啟動監控agent [[email protected] ~]# ss -ntulp |grep zabbix_agentd //檢視埠資訊為10050 tcp LISTEN 0 128 *:10050 *:* users:(("zabbix_agentd",pid=23505,fd=4),("zabbix_agentd",pid=23504,fd=4)

二、windows安裝

解壓zabbix_agents_2.4.0.win.zip 並改名目錄為zabbix_agents(當然這個目錄名可以自定義)

 然後開啟這個目錄下的C:\zabbix_agents\conf\zabbix_agentd.win.conf  

找到conf下的配置檔案 zabbix_agentd.win.conf ,修改LogFile、Server、ServerActive 、Hostname這幾個引數。具體配置如下:

LogFile=E:\zabbix\zabbix_agentd.log    //日誌檔案存放位置

Server=172.17.22.155                  //填寫你zabbix伺服器IP

ServerActive=172.17.22.155            //填寫你zabbix伺服器IP

Hostname=Windows_A                    

1 . 然後進入到C:\Windows\System32目錄下,找到cmd.exe程式 (注意有的人檔案型別字尾是隱藏的就會看不到.exe)

2. 右鍵點選這個cmd.exe ,在彈出右鍵選單中選  “以管理員身份執行(A)”  

3. 然後輸入以下命令(記住根據你實際存放的路徑做相應更改)

//第一條執行安裝命令 -i 代表安裝install ,成功安裝會有提示
C:\zabbix_agents\bin\win64\zabbix_agentd.exe -i -c C:\zabbix_agents\conf\zabbix_agentd.win.conf

//第二條執行啟動執行命令 -s 表示啟動服務 上面和下面的-c 都表示指從哪裡讀取配置檔案 ,啟動成功會有提示
C:\zabbix_agents\bin\win64\zabbix_agentd.exe -c C:\zabbix_agents\conf\zabbix_agentd.win.conf -s

//第三條根據解除安裝服務命令
C:\zabbix_agents\bin\win64\zabbix_agentd.exe -d


可檢視幫助如下

 還可以通過檢視服務項是否有這項來確定是否安裝啟動成功