zabbit-agent安装详细教程

特别说明:该环境运行在centos7.9版本minimal install系统上 zabbix版本在5.0LTS 版本

执行以下命令 进行安装zabbix-agent

禁止selinux使用
需要重启服务器

sed -i 's#SELINUX=enforcing#SELINUX=disabled#' /etc/selinux/config
reboot

引用阿里云镜像源 zabbix镜像替换成阿里云

rm -rf /etc/yum.repos.d/*
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix.repo
sed -i 's#enabled=0#enabled=1#' /etc/yum.repos.d/zabbix.repo

清除缓存,更新源

yum clean all
yum makecache
yum update

安装zabbix相关组件

yum install  -y vim
yum install -y zabbix-agent.x86_64

修改zabbix配置文件

vim /etc/zabbix/zabbix_agentd.conf 

修改内容
Server=替换成zabbix-server服务器ip
ServerActive=替换成zabbix-server服务器ip
按esc :wq保存退出

启动zabbix服务

systemctl start zabbix-agent
systemctl enable zabbix-agent

开启端口

firewall-cmd --add-port=10051/tcp --permanent
firewall-cmd --add-port=10050/tcp --permanent
firewall-cmd --reload
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值