NO.B.0004——zabbix_lamp+zabbix.agent.yum源安裝_V.201027
阿新 • • 發佈:2020-11-18
一、安裝zabbix-agent:
效驗我們所安裝的是否正常:
以root身份執行代理
Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart ——W.S.Landor
來自為知筆記(Wiz)
1、新增zabbix倉庫: [root@localhost ~]# > rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm // 把zabbix.repo檔案裡面的內容替換為以下內容: [root@localhost ~]# cat>/etc/yum.repos.d/zabbix.repo<<EOF [zabbix] name=Zabbix Official Repository - $basearch baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/$basearch/ enabled=1 gpgcheck=1 gpgkey=https://mirrors.tuna.tsinghua.edu.cn/zabbix/RPM-GPG-KEY-ZABBIX-A14FE591 [zabbix-non-supported] name=Zabbix Official Repository non-supported - $basearch baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/non-supported/rhel/7/$basearch/ enabled=1 gpgkey=https://mirrors.tuna.tsinghua.edu.cn/zabbix/RPM-GPG-KEY-ZABBIX gpgcheck=1 EOF # Zabbix前端需要基本安裝中不提供的其他軟體包。您需要在將執行Zabbix前端的系統中啟用可選rpm的儲存庫: [root@localhost ~]# yum-config-manager --enable rhel-7-server-optional-rpms 2、使用如下命令安裝zabbix-agent [root@localhost ~]# yum -y install zabbix-agent 3、啟動zabbix-agent -y [root@localhost ~]# systemctl start zabbix-agent.service [root@localhost ~]# systemctl enable zabbix-agent.service 日誌檔案地址: [root@localhost ~]# cat /var/log/zabbix/zabbix_agentd.log
效驗我們所安裝的是否正常:
通過如下命令進行效驗:
[root@localhost ~]# ss -tunlp
zabbix-server 監聽埠為tcp 10051
zabbix-agent 監聽埠為tcp 10050
以root身份執行代理
//要覆蓋此行為,請建立檔案: [root@localhost ~]# vim /etc/systemd/system/zabbix-agent.service.d/orride.conf [Service] User=root Group=root 5、重新載入守護程式並重啟zabbix-agent服務: [root@localhost ~]# systemctl daemon-reload [root@localhost ~]# systemctl restart zabbix-agent
Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart ——W.S.Landor
來自為知筆記(Wiz)