zabbix实现自动化运维监控

本文介绍了如何使用Zabbix实现自动化运维监控,包括Zabbix的安装、MySQL的配置、Zabbix客户端的设置以及如何监控一台机器。详细步骤涵盖从安装Zabbix server到配置Zabbix web,再到客户端的安装和启动,最后展示了监控效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

zabbix实现自动化运维监控

  1. zabbix([`zæbiks])是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案。
  2. zabbix能监视各种网络参数,保证服务器系统的安全运营;并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题。
  3. zabbix由2部分构成,zabbix server与可选组件zabbix agent。
    Zabbix主要功能:
  • CPU负荷
  • 内存使用
  • 磁盘使用
  • 网络状况
  • 端口监视
  • 日志监视。
    任务目的
    • 学习Zabbix 的安装
    • 掌握Zabbix 的简单配置

安装Zabbix

一、Zabbix安装部署环境准备

[root@compute ~]# cat /etc/redhat-release  // 查看系统版本

CentOS Linux release 7.4.1708 (Core)

[root@compute ~]# uname -r // 查看内核版本

3.10.0-693.el7.x86_64

[root@compute ~]# getenforce  // 检测selinux是否关闭

Enforcing

[root@compute ~]# vim /etc/selinux/config  // 关闭selinux

SELINUX=disabled

Init 6 // 如果是Enforcing 设置后重启
[root@compute ~]# setenforce 0 //临时关闭
[root@compute ~]# systemctl disable firewalld  // 关闭防火墙开机自启动

Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

[root@compute ~]# systemctl stop firewalld  // 关闭防火墙

二、安装MySQL,并初始化

1)安装数据库

[root@compute ~]# yum install -y mariadb-server
[root@compute ~]systemctl start mariadb

2)设root用户密码

[root@compute ~]# mysqladmin -u root password 123456

初始化zabbix库、表用户

1、[root@compute ~]# mysql -u root –p123456
2、MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
3、MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
4、MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@compute identified by 'zabbix';
5、\q;

三、安装zabbix

1)安装zabbix的yum源

[root@compute ~]# ls /etc/yum.repos.d/

CentOS-Base.repo CentOS-local.repo CentOS-Sources.repo

[root@compute ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
[root@compute ~]# ls /etc/yum.repos.d/

CentOS-Base.repo CentOS-local.repo CentOS-Sources.repo zabbix.repo

[root@compute ~]# cat /etc/yum.repos.d/zabbix.repo

显示:

[zabbix]
name=Zabbix Official Repository - b a s e a r c h b a s e u r l = h t t p

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值