Zabbix 监控系统搭建

Zabbix 监控系统搭建

1、实验环境准备

  • centos7.5 系统服务器3台、 一台作为监控服务器, 两台台作为被监控节点, 配置好yum源、 防火墙关闭、 各节点时钟服务同步、 各节点之间可以通过主机名互相通信。
主机名 IP 配置 服务器角色 备注
zabbix 192.168.122.221 zabbix-server 开启监控功能
node-1 192.168.122.208 zabbix-agent 开启客户端
node-2 192.168.122.56 zabbix-agent 开启客户端

2、Zabbix的安装

1、修改主机名
[root@localhost ~]# hostnamectl --static set-hostname zabbix
[root@localhost ~]# hostnamectl --static set-hostname node-1
[root@localhost ~]# hostnamectl --static set-hostname node-2
2、关闭防火墙
[root@zabbix ~]#  systemctl stop firewalld
[root@zabbix ~]#  systemctl disable firewalld
3、开启邮件服务
[root@zabbix ~]# systemctl status postfix
[root@zabbix ~]# systemctl start postfix
[root@zabbix ~]# systemctl enable postfix
4、关闭 SELinux
[root@zabbix ~]#  sed -ri '/SELINUX=/cSELINUX=disabled' /etc/selinux/config
[root@zabbix ~]#  setenforce 0           # 临时关闭SELinux
[root@zabbix ~]#  reboot
5、添加 hosts
[root@zabbix zabbix]# cat >> /etc/hosts <<-EOF
192.168.122.221 zabbix
192.168.122.208 node-1
192.168.122.56 node-2
6、安装 yum 仓库
[root@zabbix ~]# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
7、更新 yum 仓库
[root@zabbix ~]# yum repolist 
Loaded plugins: fastestmirror, langpacks  
Loading mirror speeds from cached hostfile
zabbix-non-supported                                                      4/4
repo id                     repo name                                   status
base                        base                                         9,363
epel                        epel                                        11,349
zabbix/x86_64               Zabbix Official Repository - x86_64             80
zabbix-non-supported/x86_64 Zabbix Official Repository non-supported -       4
repolist: 20,796
8、安装 Zabbix server and agent
[root@zabbix ~]# yum -y install epel-release.noarch
[root@zabbix ~]# yum -y install zabbix-agent zabbix-get zabbix-sender zabbix-server-mysql 
9、安装 Zabbix 前端
[root@zabbix ~]# yum -y install centos-release-scl
  • 开启 前端安装源仓库配置并安装 zabbix 前端
[root@zabbix ~]# yum install --enablerepo=zabbix-frontend zabbix-web-mysql-scl zabbix-apache-conf-scl -y
2)安装设置数据库:
1、创建 mariadb.repo
[root@zabbix ~]# cat >> /etc/yum.repos.d/mariadb.repo <<-EOF
[mariadb]
name = MariaDB 
baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.5/centos7-amd64 
gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB 
gpgcheck
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值