Zabbix-agent 6.0 快速安装部署

第一种下载方法

使用阿里云的源安装 Zabbix-agent

[root@agent-41 ~]# rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/6.0/rhel/7/x86_64/zabbix-agent-6.0.12-release1.el7.x86_64.rpm?spm=a2c6h.25603864.0.0.4a7e7a10yQa5Nh

第二种下载方法

添加zabbix官方源(第一种方法安装时提示缺依赖时可以这样)

[root@agent-41 ~]# vim /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository
baseurl=http://repo.zabbix.com/zabbix/6.0/rhel/7/x86_64/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[root@agent-41 ~]# yum clean all
[root@agent-41 ~]# yum makecache
[root@agent-41 ~]# yum install -y zabbix-agent

zabbix-agent下载好后修改配置文件

[root@agent-41 ~]# vim /etc/zabbix/zabbix_agentd.conf
#主要是修改Server为Zabbix-server的IP
[root@agent-41 ~]# grep -n '^[a-Z]' /etc/zabbix/zabbix_agentd.conf 
13:PidFile=/run/zabbix/zabbix_agentd.pid
32:LogFile=/var/log/zabbix/zabbix_agentd.log
43:LogFileSize=0
117:Server=192.168.10.40
171:ServerActive=127.0.0.1
182:Hostname=Zabbix server
323:Include=/etc/zabbix/zabbix_agentd.d/*.conf

启动 Zabbix-agent 服务

[root@agent-41 ~]# systemctl start zabbix-agent
[root@agent-41 ~]# systemctl enable zabbix-agent
[root@agent-41 ~]# systemctl status zabbix-agent

虚拟机无法安装zabbix-agent依赖解决方法(配置阿里云的源)

[root@agent-41 ~]# vim /etc/yum.repos.d/aliyun.repo
[aliyun-os]
name=aliyun-os
baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

[aliyun-extra]
name=aliyun-extra
baseurl=https://mirrors.aliyun.com/centos/7/extras/x86_64/
enabled=1
gpgcheck=0

[aliyun-epel]
name=aliyun-epel
baseurl=https://mirrors.aliyun.com/epel/7Server/x86_64/
enabled=1
gpgcheck=0
#重新加载缓存
[root@agent-41 ~]# yum clean all
[root@agent-41 ~]# yum makecache
配置好阿里云的源再重新走上面的下载安装配置流程即可

Web端添加监控主机

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_52906737/article/details/128344172