欢迎来到代码驿站!

当前位置:首页 >

zabbix-agent在麒麟V10上的安装过程

时间:2021-09-15 10:44:48|栏目:|点击:

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

上一篇:分享十条实用的Swift小提示

栏    目:

下一篇:docker 容器上编译 go 程序提示找不到文件问题

本文标题:zabbix-agent在麒麟V10上的安装过程

本文地址:http://www.codeinn.net/misctech/175267.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有