NO.B.0004——zabbix_lamp+zabbix.agent.yum源安装_V.201027

一、安装zabbix-agent:
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_marker id="wiz-painter-root" style="">

 

 

posted on   yanqi_vip  阅读(50)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示