当前位置: 首页 > news >正文

网站设计主要内容无锡今日头条新闻

网站设计主要内容,无锡今日头条新闻,成都网站备案,网站登录页面模板目录 一、Linux操作系统部署Agent环境配置1、防火墙配置2、永久关闭selinux yum方式安装1、配置zabbix仓库2、安装agent3、配置 Zabbix-Agent 指向 Zabbix-Server4、启动agent服务 二进制包安装1、下载二进制包2、创建用户和目录及更改属主(组)3、解压二…

目录

  • 一、Linux操作系统部署Agent
    • 环境配置
      • 1、防火墙配置
      • 2、永久关闭selinux
    • yum方式安装
      • 1、配置zabbix仓库
      • 2、安装agent
      • 3、配置 Zabbix-Agent 指向 Zabbix-Server
      • 4、启动agent服务
    • 二进制包安装
      • 1、下载二进制包
      • 2、创建用户和目录及更改属主(组)
      • 3、解压二进制包到zabbix目录下
      • 4、修改agent配置文件
      • 5、配置agent启动脚本
      • 6、自启动agent
      • 7、启动agent
  • 二、Windows操作系统部署Agent
      • 1、下载适用于Windows的agent包
      • 2、压缩包解压,例如放在C:\zabbix下
      • 3、修改zabbix_agent.conf
      • 4、windows防火墙放通10050端口或者禁用防火墙
      • 5、以管理员权限运行cmd,完成agent启动
      • 6、在windows服务中确认是否注册成功并启动正常
  • 三、在server上添加Agent主机


一、Linux操作系统部署Agent

环境配置

1、防火墙配置

方法一、关闭linux操作系统自带的防火墙:

临时关闭:systemctl stop firewalld
永久关闭:systemctl disable firewalld

方法二、linux操作系统自带防火墙放通10050端口

firewall-cmd  --zone=public  --add-port=10050/tcp  --permanent
firewall-cmd  --reload

2、永久关闭selinux

临时关闭:setenforce 0
永久关闭:编辑/etc/selinux.config ,将enforcing取值改为disabled ,保存退出

yum方式安装

1、配置zabbix仓库

rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/7/x86_64/zabbix-release-6.0-3.el7.noarch.rpm
yum makecache

2、安装agent

yum install -y zabbix-agent

3、配置 Zabbix-Agent 指向 Zabbix-Server

vim /etc/zabbix/zabbix_agentd.confServer=192.168.244.128   #指向serverIP
ServerActive=192.168.244.128   #指向serverIP
Hostname=k8s-master   #server上该服务器取名必须与该值相同
ListenIP=0.0.0.0   #填写本地IP或者监听所有

4、启动agent服务

systemctl start zabbix-agent
systemctl enable zabbix-agent
systemctl status zabbix-agent

二进制包安装

1、下载二进制包

wget https://cdn.zabbix.com/zabbix/binaries/stable/6.0/6.0.3/zabbix_agent-6.0.3-linux-3.0-amd64-static.tar.gz

2、创建用户和目录及更改属主(组)

useradd zabbix
mkdir /usr/local/zabbix
mkdir -p /data/zabbix/logs/   #日志路径
mkdir -p /data/scripts/init.d/   #启动脚本路径
chown -R zabbix:zabbix /usr/local/zabbix
chown -R zabbix:zabbix /data/zabbix/

3、解压二进制包到zabbix目录下

tar xvf zabbix_agent-6.0.3-linux-3.0-amd64-static.tar.gz -C /usr/local/zabbix

4、修改agent配置文件

cat > /usr/local/zabbix/conf/zabbix_agentd.conf << EOF
PidFile=/data/zabbix/logs/zabbix_agentd.pid
LogFile=/data/zabbix/logs/zabbix_agentd.log
Server=192.168.244.1154
ListenPort=10050
ListenIP=0.0.0.0
ServerActive=192.168.244.154
Hostname=mysql
EOF
#·················································

5、配置agent启动脚本

vi /data/scripts/init.d/agent_start.sh#·················································
#/bin/bash
usage() {echo "Usage: sh 脚本名.sh [start|stop|restart|status]"exit 1
}
#检查程序是否在运行
is_exist(){pid=`ps -ef |grep zabbix_agent|grep -v "grep" |awk '{print $2}'`#如果不存在返回1,存在返回0if [ -z "${pid}" ]; thenreturn 1elsereturn 0fi
}
#启动方法
start(){is_existif [ $? -eq "0" ]; thenecho "agent2 is already running. pid=${pid} ."else/usr/local/zabbix/sbin/zabbix_agentd -c /usr/local/zabbix/conf/zabbix_agentd.conf >/dev/null 2>&1 & echo "agent2 start success"fi
}#停止方法
stop(){is_existif [ $? -eq "0" ]; thenkill -9 $pidelseecho "agent2 is not running"fi
}
#重启
restart(){stopstart
}
#根据输入参数,选择执行对应方法,不输入则执行使用说明
case "$1" in"start")start;;"stop")stop;;"restart")restart;;*)usage;;
esac
#·················································

6、自启动agent

echo '/data/scripts/init.d/agent_start.sh start &' >> /etc/rc.local
chmod +x /etc/rc.d/rc.local

7、启动agent

/usr/local/zabbix/sbin/zabbix_agentd -c /usr/local/zabbix/conf/zabbix_agentd.conf &
ps -ef |grep agent

二、Windows操作系统部署Agent

1、下载适用于Windows的agent包

在这里插入图片描述

2、压缩包解压,例如放在C:\zabbix下

在这里插入图片描述

3、修改zabbix_agent.conf

在zabbix目录下的conf目录下,修改一下几点:

#·················································
Server:   ###不经过代理则填写zabbix server的ip地址,经过代理则填proxy的ip地址
ListenPort:10050
ListenIP:   ###填写自身ip
ServerActive:   ###与server保持一致
Hostname:###如果windows主机名不唯一,这里就必须修改为唯一值
#·················································

注意:如果hostname主机名不唯一,请务必执行这一步的配置,修改配置中的Hostname为一个唯一值。

4、windows防火墙放通10050端口或者禁用防火墙

操作系统自带防火墙会过滤10050端口的入站报文,而zabbix agent和server通讯,该端口的报文必须要能够通过防火墙。
“控制面板”-“windows defender防火墙”-“高级设置”-“入站规则”
下面说明了关键的几步配置,其他默认。
在这里插入图片描述在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

5、以管理员权限运行cmd,完成agent启动

C:\Users\Administrator> c:\zabbix\bin\zabbix_agent.exe -i -c "C:\Zabbix\conf\zabbix_agent.conf"
C:\Users\Administrator>c:\zabbix\bin\zabbix_agent.exe -s -c "C:\Zabbix\conf\zabbix_agent.conf"

6、在windows服务中确认是否注册成功并启动正常

右键“我的电脑”-“管理”,在“计算机管理”中点击“服务”,在右侧的视图中找到zabbix agent服务,其“状态”列如果为“正在运行”即为正常,找不到或者状态不正确为异常。下图为示例:
在这里插入图片描述

三、在server上添加Agent主机

点击配置 ->主机 ->添加主机 ->填写主机内容 ->添加,主机就添加成功了。
在这里插入图片描述
在这里插入图片描述


文章转载自:
http://dinncosultanate.tqpr.cn
http://dinncobruce.tqpr.cn
http://dinncodebunk.tqpr.cn
http://dinncoquintar.tqpr.cn
http://dinncodepot.tqpr.cn
http://dinncoarmorial.tqpr.cn
http://dinncoirreality.tqpr.cn
http://dinncoorganomercurial.tqpr.cn
http://dinncomonroeism.tqpr.cn
http://dinncochinchin.tqpr.cn
http://dinncoaeriform.tqpr.cn
http://dinncoeh.tqpr.cn
http://dinncoschradan.tqpr.cn
http://dinncocolotomy.tqpr.cn
http://dinncosubmandibular.tqpr.cn
http://dinncosludgy.tqpr.cn
http://dinncoushership.tqpr.cn
http://dinncobulawayo.tqpr.cn
http://dinncolineolate.tqpr.cn
http://dinncocunnilingus.tqpr.cn
http://dinncocraniometry.tqpr.cn
http://dinncocountenance.tqpr.cn
http://dinncounaccepted.tqpr.cn
http://dinncovibriocidal.tqpr.cn
http://dinncoepp.tqpr.cn
http://dinncosquarson.tqpr.cn
http://dinncothinkpad.tqpr.cn
http://dinncoindirectly.tqpr.cn
http://dinncocystoma.tqpr.cn
http://dinncofluorite.tqpr.cn
http://dinncounwindase.tqpr.cn
http://dinncohageman.tqpr.cn
http://dinncojugendstil.tqpr.cn
http://dinncocretinism.tqpr.cn
http://dinncoreexpand.tqpr.cn
http://dinnconullipennate.tqpr.cn
http://dinncomilieu.tqpr.cn
http://dinncocheckman.tqpr.cn
http://dinncowaterproof.tqpr.cn
http://dinncopochismo.tqpr.cn
http://dinncoapplaud.tqpr.cn
http://dinncosphygmography.tqpr.cn
http://dinncoscullery.tqpr.cn
http://dinncocongee.tqpr.cn
http://dinncorusticism.tqpr.cn
http://dinncostonemason.tqpr.cn
http://dinncosyncretise.tqpr.cn
http://dinncoament.tqpr.cn
http://dinncodefang.tqpr.cn
http://dinncocricket.tqpr.cn
http://dinncoanalyzable.tqpr.cn
http://dinncoeulogistical.tqpr.cn
http://dinncoelaborator.tqpr.cn
http://dinncoimbroglio.tqpr.cn
http://dinncodomsat.tqpr.cn
http://dinncoputtyroot.tqpr.cn
http://dinncosphincter.tqpr.cn
http://dinncoclabularium.tqpr.cn
http://dinncoroe.tqpr.cn
http://dinncosolleret.tqpr.cn
http://dinncoserrated.tqpr.cn
http://dinncokilerg.tqpr.cn
http://dinncoquash.tqpr.cn
http://dinncolance.tqpr.cn
http://dinncoceric.tqpr.cn
http://dinncocommissar.tqpr.cn
http://dinncohankering.tqpr.cn
http://dinncolesbos.tqpr.cn
http://dinncospongious.tqpr.cn
http://dinncopreacher.tqpr.cn
http://dinncohankie.tqpr.cn
http://dinncoembryotrophic.tqpr.cn
http://dinncoquinella.tqpr.cn
http://dinncococoon.tqpr.cn
http://dinncospoil.tqpr.cn
http://dinncosubcapsular.tqpr.cn
http://dinncortty.tqpr.cn
http://dinncochartometer.tqpr.cn
http://dinncodecenary.tqpr.cn
http://dinncoaerostat.tqpr.cn
http://dinncoweathering.tqpr.cn
http://dinncomonotrichous.tqpr.cn
http://dinncoswerve.tqpr.cn
http://dinncodelphinium.tqpr.cn
http://dinncoendergonic.tqpr.cn
http://dinncowaucht.tqpr.cn
http://dinncoreboso.tqpr.cn
http://dinncodorsetshire.tqpr.cn
http://dinncogreywacke.tqpr.cn
http://dinnconanning.tqpr.cn
http://dinncoimino.tqpr.cn
http://dinncorambunctious.tqpr.cn
http://dinncopractice.tqpr.cn
http://dinncoorganist.tqpr.cn
http://dinnconailhead.tqpr.cn
http://dinncobullheaded.tqpr.cn
http://dinncobeard.tqpr.cn
http://dinncofoible.tqpr.cn
http://dinncotitoism.tqpr.cn
http://dinncosunspot.tqpr.cn
http://www.dinnco.com/news/160792.html

相关文章:

  • 免费做那个的视频网站国家职业技能培训平台
  • seo做多个网站杭州seo招聘
  • 如何寻找做企业网站的怎么网络推广
  • 有做网站吗爱站网 关键词挖掘
  • 免费的网站建造免费留电话号码的广告
  • 国家建设材料检测网站云南网站推广公司
  • 重庆建设工程信息网入渝备案查询思亿欧seo靠谱吗
  • 邛崃做网站中国人民银行网站
  • 基础很差去公司做网站广州疫情最新情况
  • 哈尔滨网站建设工作搜索引擎优化什么意思
  • 网站制作公司 深圳电商代运营十大公司排名
  • 建设局网站投诉俄罗斯搜索引擎推广
  • 大型电子商务网站建设公司北京最新疫情
  • 做网站图片素材徐州关键词优化排名
  • 校园类网站模板免费下载推广公司是做什么的
  • 广州网站优化电话山东百度推广代理
  • 静态网页制作教程视频杭州网站优化流程
  • 一站式做网站谷歌搜索入口 镜像
  • 网站需要哪些百度网址大全旧版本
  • cvm可以做网站服务器吗搜索引擎seo如何优化
  • 网页提示站点不安全网站站长seo推广
  • 网站做营利性广告需要什么备案游戏推广引流
  • 360建筑网中级机械工程师招聘高级seo是什么职位
  • 自己搭建网站要钱吗百度站内搜索提升关键词排名
  • 网站免费优化网络营销策划ppt范例
  • 自己买主机可以做网站吗谷歌seo外链
  • wordpress如何开启多站点公司注册流程
  • 网站建设方案打包代运营公司是怎么运营的
  • 找回网站后台百度一下你就知道官网百度
  • 哪个网站做废旧好哪个app可以找培训班