您的位置:首頁技術文章
文章詳情頁

zabbix-agent在麒麟V10上的安裝過程

瀏覽:151日期:2023-04-06 15:09:34

1、安裝包下載

下載地址:https://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/

2、安裝

#增加zabbix用戶并設置為不可登錄狀態

shell > useradd -r -s /sbin/nologin zabbix

#將下載包上傳到麒麟V10服務器上后解壓

shell >tarzxf zabbix-3.0.22.tar.gz

shell > cd zabbix-3.0.22

shell > ./configure --prefix=/usr/local/zabbix_agent --enable-agent 

shell >make install

3、配置

shell >cp /root/zabbix-3.0.22/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/#復制啟動腳本

shell >sed -i "s#BASEDIR=/usr/local#BASEDIR=/usr/local/zabbix_agent#" /etc/init.d/zabbix_agentd #修改Agent安裝路徑

 shell >vim /usr/local/zabbix_agent/etc/zabbix_agentd.conf#調整配置文件

LogFile=/tmp/zabbix_agentd.log

Server=xxx.xxx.xxx.xxx# Zabbix Server IP (被動模式,客戶端被動)

ServerActive=127.0.0.1#主動模式,如果使用也填Zabbix Server IP,不使用可以注釋掉

Hostname=101.201.142.247#主機名Zabbix Server添加主機時需要使用

Include=/usr/local/zabbix_agent/etc/zabbix_agentd.conf.d/*.conf#加載自定義的監控配置文件

UnsafeUserParameters=1 #允許自定義Key

4、啟動

shell > service zabbix_agentd start

shell > chkconfig --add zabbix_agentd

shell > chkconfig --level35zabbix_agentd on

shell > iptables -A INPUT -s"Zabbix Server IP"-p tcp --dport10050-j ACCEPT #由于是客戶端被動模式,所以要開放端口供Zabbix Server連接

后續可用systemctl start/stop/status zabbix_agentd.service來操作zabbix_agent

到此這篇關于zabbix-agent在麒麟V10上的安裝過程的文章就介紹到這了,更多相關zabbix-agent安裝麒麟V10內容請搜索以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持!

標簽: Zabbix
相關文章:
国产综合久久一区二区三区