zabbix-agent5.4安装centos6/7/8/windows
1、linux客户端安装zabbix-agent服务:在线安装下载并安装[root@centos ~]# rpm –ivh https://repo.zabbix.com/zabbix/5.4/rhel/8/x86_64/zabbix-release-5.4-1.el8.noarch.rpm安装zabbix-agent[root@centos ~]# yum install zabbix-agen
1、linux客户端安装zabbix-agent服务:
在线安装下载并安装
[root@centos ~]# rpm –ivh https://repo.zabbix.com/zabbix/5.4/rhel/8/x86_64/zabbix-release-5.4-1.el8.noarch.rpm
安装zabbix-agent
[root@centos ~]# yum install zabbix-agent -y
离线安装,下载zabbix-agent导入到linux系统
https://repo.zabbix.com/zabbix/5.4/rhel/8/x86_64/zabbix-agent-5.4.2-1.el8.x86_64.rpm
https://repo.zabbix.com/zabbix/5.4/rhel/6/x86_64/zabbix-agent-5.4.2-1.el6.x86_64.rpm
https://repo.zabbix.com/zabbix/5.4/rhel/7/x86_64/zabbix-agent-5.4.2-1.el7.x86_64.rpm
CentOS6安装server-agent服务并配置服务
zabbix-agent-5.4.2-1.el6.x86_64.rpm
[root@centos ~]# rpm -ivh zabbix-agent-5.4.2-1.el6.x86_64.rpm
[root@centos ~]# vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.20.11 //这里写server端的ip
ServerActive=192.168.20.11 //server端的ip
Hostname=centos6 //这里写本机名,随便写
[root@centos ~]# /etc/init.d/zabbix-agent start //启动 zabbix-agent 服务
[root@centos ~]# systemctl start zabbix-agent //centos7、8
[root@centos ~]# netstat -antlp | grep zabbix_agentd
设置开机自启动
[root@centos ~]# vim /etc/rc.d/rc.local
添加
/etc/init.d/zabbix-agent start
或者用chkconfig设置开机自启动
[root@localhost ~]# chkconfig zabbix-agent on
[root@centos ~]# systemctl enable zabbix-agent //centos7、8
注意事项
关闭防火墙 stop firewalld.service
关闭SELinux setenforce 0
2、windows客户端安装zabbix-agent服务
下载对应的windows版本
解压zabbix_agent-5.4.2-windows-amd64.zip
里面有一个bin和一个conf文件夹
在C盘创建zabbix文件夹
将解压的bin和conf 文件夹复制到zabbix下
编辑zabbix_agentd.conf
修改下面几项
Server = 192.168.20.11
ServerActive= 192.168.20.11
#填写zabbix服务器IP地址
Hostname=windows2012
#zabbix-agent客户端计算机名 (被监控主机)
6、桌面-开始-运行-输入cmd 打开DOS命令窗口-输入以下两条命令进行zabbix客户端安装。(必须要以管理员身份运行打开DOS命令窗口)
C:\zabbix\bin\zabbix_agentd.exe -i -c C:\zabbix\conf\zabbix_agentd.conf
#安装zabbix客户端
C:\zabbix\bin\zabbix_agentd.exe -s -c C:\zabbix\conf\zabbix_agentd.conf
#启动zabbix服务
特别强调:
路径一定不要搞错,否则导致服务起不来,下面是解决方案。
首先需要在服务界面将Zabbix Agent服务给停掉
然后在CMD窗口下执行删除zabbix客户端操作
C:\zabbix\bin\zabbix_agentd.exe -d -c C:\zabbix\conf\zabbix_agentd.conf
删除成功,接着再次从第一步开始。
##########################################
以下可忽略,SNMP配置
server端
[root@centos ~]# yum install -y net-snmp
[root@centos ~]# vim /etc/snmp/snmpd.conf
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view systemview included .1 //手动新增加这行
[root@centos ~]# chkconfig snmpd on //开启SNMP服务自启动
[root@centos ~]# /etc/init.d/snmpd start //启动SNMP服务
或者
[root@centos ~]# service snmpd start
被监控端
[root@centos ~]# yum install -y net-snmp
[root@centos ~]# vim /etc/snmp/snmpd.conf
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
view systemview included .1 //手动新增加这行
com2sec notConfigUser default public //default字符串默认是所有IP地址都可以访问,如果把default修改成zabbix服务器IP地址,表示只允许zabbix服务器访问这台被监控电脑的SNMP服务
[root@centos ~]# chkconfig snmpd on //开启SNMP服务自启动
[root@centos ~]# service snmpd start
更多推荐
所有评论(0)