部署Zabbix 6.0 LTS
Blog:博客园 个人
本部署文档适用于CentOS 8.X/RHEL 8.X/Anolis OS 8.X/AlmaLinux 8.X。
Zabbix 6.0 LTS于2022年2月15日发布,本次大版本更新,最大亮点是增加了原生HA、机器学习、Kubernetes监控等。
Requirements
硬件要求
| Name | Platform | CPU/Memory | Database | Monitored hosts |
|---|---|---|---|---|
| Small | CentOS | Virtual Appliance | MySQL InnoDB | 100 |
| Medium | CentOS | 2 CPU cores/2GB | MySQL InnoDB | 500 |
| Large | RedHat Enterprise Linux | 4 CPU cores/8GB | RAID10 MySQL InnoDB or PostgreSQL | >1000 |
| Very large | RedHat Enterprise Linux | 8 CPU cores/16GB | Fast RAID10 MySQL InnoDB or PostgreSQL | >10000 |
软件要求
Database management system
| Software | Supported versions | Comments |
|---|---|---|
| MySQL/Percona | 8.0.X | Required if MySQL (or Percona) is used as Zabbix backend database. InnoDB engine is required. We recommend using the MariaDB Connector/C library for building server/proxy. |
| MariaDB | 10.5.00-10.6.X | InnoDB engine is required. We recommend using the MariaDB Connector/C library for building server/proxy. |
| Oracle | 19c - 21c | Required if Oracle is used as Zabbix backend database. |
| PostgreSQL | 13.X | Required if PostgreSQL is used as Zabbix backend database. |
| TimescaleDB for PostgreSQL | 2.0.1-2.3 | Required if TimescaleDB is used as Zabbix backend database. Make sure to install the distribution of TimescaleDB with the compression supported. |
| SQLite | 3.3.5-3.34.X | SQLite is only supported with Zabbix proxies. Required if SQLite is used as Zabbix proxy database. |
Frontend
The minimum supported screen width for Zabbix frontend is 1200px.
| Software | Version | Comments |
|---|---|---|
| Apache | 1.3.12 or later | |
| PHP | 7.2.5 or later | PHP 8.0 is not supported. |
| PHP extensions: | ||
| gd | 2.0.28 or later | PHP GD extension must support PNG images (--with-png-dir), JPEG (--with-jpeg-dir) images and FreeType 2 (--with-freetype-dir). |
| bcmath | php-bcmath (--enable-bcmath) | |
| ctype | php-ctype (--enable-ctype) | |
| libXML | 2.6.15 or later | php-xml, if provided as a separate package by the distributor. |
| xmlreader | php-xmlreader, if provided as a separate package by the distributor. | |
| xmlwriter | php-xmlwriter, if provided as a separate package by the distributor. | |
| session | php-session, if provided as a separate package by the distributor. | |
| sockets | php-net-socket (--enable-sockets). Required for user script support. | |
| mbstring | php-mbstring (--enable-mbstring) | |
| gettext | php-gettext (--with-gettext). Required for translations to work. | |
| ldap | php-ldap. Required only if LDAP authentication is used in the frontend. | |
| openssl | php-openssl. Required only if SAML authentication is used in the frontend. | |
| mysqli | Required if MySQL is used as Zabbix backend database. | |
| oci8 | Required if Oracle is used as Zabbix backend database. | |
| pgsql | Required if PostgreSQL is used as Zabbix backend database. |
Server
Mandatory requirements are needed always. Optional requirements are needed for the support of the specific function.
| Requirement | Status | Description |
|---|---|---|
| libpcre | Mandatory | PCRE library is required for Perl Compatible Regular Expression (PCRE) support. The naming may differ depending on the GNU/Linux distribution, for example 'libpcre3' or 'libpcre1'. PCRE v8.x and PCRE2 v10.x (from Zabbix 6.0.0) are supported. |
| libevent | Required for bulk metric support and IPMI monitoring. Version 1.4 or higher. Note that for Zabbix proxy this requirement is optional; it is needed for IPMI monitoring support. | |
| libpthread | Required for mutex and read-write lock support. | |
| zlib | Required for compression support. | |
| OpenIPMI | Optional | Required for IPMI support. |
| libssh2 or libssh | Required for SSH checks. Version 1.0 or higher (libssh2); 0.6.0 or higher (libssh). libssh is supported since Zabbix 4.4.6. | |
| fping | Required for ICMP ping items. | |
| libcurl | Required for web monitoring, VMware monitoring, SMTP authentication, web.page.* Zabbix agent items, HTTP agent items and Elasticsearch (if used). Version 7.28.0 or higher is recommended. Libcurl version requirements: - SMTP authentication: version 7.20.0 or higher - Elasticsearch: version 7.28.0 or higher |
|
| libxml2 | Required for VMware monitoring and XML XPath preprocessing. | |
| net-snmp | Required for SNMP support. Version 5.3.0 or higher. | |
| GnuTLS, OpenSSL or LibreSSL | Required when using encryption. |
Agent
| Requirement | Status | Description |
|---|---|---|
| libpcre | Mandatory | PCRE library is required for Perl Compatible Regular Expression (PCRE) support. The naming may differ depending on the GNU/Linux distribution, for example 'libpcre3' or 'libpcre1'. PCRE v8.x and PCRE2 v10.x (from Zabbix 6.0.0) are supported. |
| GnuTLS, OpenSSL or LibreSSL | Optional | Required when using encryption. On Microsoft Windows systems OpenSSL 1.1.1 or later is required. |
Agent 2
| Requirement | Status | Description |
|---|---|---|
| libpcre | Mandatory | PCRE library is required for Perl Compatible Regular Expression (PCRE) support. The naming may differ depending on the GNU/Linux distribution, for example 'libpcre3' or 'libpcre1'. PCRE v8.x and PCRE2 v10.x (from Zabbix 6.0.0) are supported. |
| OpenSSL | Optional | Required when using encryption. OpenSSL 1.0.1 or later is required on UNIX platforms. The OpenSSL library must have PSK support enabled. LibreSSL is not supported. On Microsoft Windows systems OpenSSL 1.1.1 or later is required. |
环境
- 系统:Rockey Linux 8.5
- 数据库:MySQL 8.0.26
数据库
wget -O /etc/yum.repos.d/mysql80.repo https://repo.mysql.com//mysql80-community-release-el8-3.noarch.rpm
dnf clean all
dnf install mysql-server mysql mysql-devel
systemctl enable mysqld
systemctl start mysqld
修改root密码
mysql> ALTER user 'root'@'localhost' IDENTIFIED BY 'PASSWORD';
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
安装
rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm
dnf clean all
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent2
创建初始数据库
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@'%' identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@'%';
mysql> quit;
导入初始架构和数据,系统将提示您输入新创建的密码。
zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix
配置
为Zabbix server配置数据库
编辑配置文件 /etc/zabbix/zabbix_server.conf:
DBPassword=password
为Zabbix前端配置PHP
编辑配置文件/etc/nginx/conf.d/zabbix.conf:
listen 80;
Tips:同时需要删除/etc/nginx/nginx.conf中的80端口相关配置,否则会打不开Zabbix前端。
启动Zabbix server和agent进程
启动Zabbix server和agent进程,并为它们设置开机自启:
systemctl restart zabbix-server zabbix-agent2 nginx php-fpm
systemctl enable zabbix-server zabbix-agent2 nginx php-fpm
配置前端
连接到新安装的Zabbix前端: http://server_ip_or_name
选择中文:

必要条件检测(世界上最好的语言):

配置DB连接:

配置:

安装完成,少年

默认用户名密码:Admin/zabbix:

进入一个和Zabbix 5.0版本差不多的界面:

中文乱码解决
图表界面出现乱码:

解决:
需要手动上传本地Windows的字体(如微软雅黑)到Zabbix服务器的/usr/share/zabbix/assets/fonts/,通常Win10字体文件在C:\Windows\Fonts路径下。
cd /usr/share/zabbix/assets/fonts
mv graphfont.ttf graphfont.ttf.backup
ln -s msyh.ttf graphfont.ttf
刷新一下图表,已显示中文:

部署Zabbix 6.0 LTS的更多相关文章
- LNMP 方式部署 zabbix 5.0
文章链接 Zabbix 5.0 LTS新增功能 新版本附带了可用性,安全性和完整性方面的重大改进列表.Zabbix团队遵循的主要策略是使Zabbix尽可能可用.Zabbix是一种开源,免费的监视解决方 ...
- Zabbix 5.0 LTS版本的安装小结
Zabbix 5.0 LTS版本的安装小结 1:准备Zabbix的服务器. 这里可能需要一台或多台服务器,视需求和资源而定.也可以将Zabbix_Server.MySQL.Zabbix Web等安 ...
- ZABBIX 4.0 LTS 部署
1. 环境说明 关于zabbix的详细使用可以参考之前的3.0 版本,该文档仅记录zabbix 4.0 编译安装过程!ZABBIX 3.0 从入门到精通(zabbix使用详解) : https://w ...
- CentOS 7.2安装zabbix 3.0 LTS
1.zabbix简介 zabbix(音同 zæbix)是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案. zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供 ...
- Zabbix 3.0 LTS安装配置
关于Zabbix监控项类型的官网介绍: https://www.zabbix.com/documentation/3.4/zh/manual/config/items/itemtypes zabbix ...
- 部署zabbix 4.0 + grafana
不完整,仅供参考 Zabbix+grafana监控部署 基本环境 系统: CentOS Linux release 7.3.1611 Zabbix—server: Zabbix_agent: N ...
- Zabbix系列-REHL6.10离线方式安装Zabbix 4.0 LTS
环境 第零步:关闭系统默认防火墙 setenforce 0 sed -i -r "/^SELINUX=/c SELINUX=disabled" /etc/selinux/confi ...
- CentOS 6.4编译安装和部署Zabbix 2.0版本监控(中文)
[一].zabbix简介 zabbix是一个基于web界面的提供分布式系统监视以及网络监视功能的企业级开元解决方案 zabbix由2部分构成,zabbix_server和可选组件zabbix_agen ...
- zabbix企业级的分布式开源监控解决方案 v5.0 LTS
目录 zabbix简介 服务模块 客户端守护进程 监控流程 功能拆解 安装 zabbix 5.0 LTS 参考官网 zabbix 5.0.12-1.el7 zabbix-server相关优化 1. 字 ...
随机推荐
- vue爬坑之路(axios 封装篇)
第一步还是先下载axios cnpm install axios -S第二步建立一个htttp.js import axios from 'axios'; import { Message } fro ...
- session反序列化
先来了解一下关于session的一些基础知识 什么是session?在计算机中,尤其是在网络应用中,称为"会话控制".Session 对象存储特定用户会话所需的属性及配置信息.这样 ...
- 一篇文章带你搞懂DEX文件的结构
*本篇文章已授权微信公众号 guolin_blog (郭霖)独家发布 DEX文件就是Android Dalvik虚拟机运行的程序,关于DEX文件的结构的重要性我就不多说了.下面,开练! 建议:不要只看 ...
- 【Android UI设计与开发】8.顶部标题栏(一)ActionBar 奥义·详解
一.ActionBar介绍 在Android 3.0中除了我们重点讲解的Fragment外,Action Bar也是一个非常重要的交互元素,Action Bar取代了传统的tittle bar和men ...
- Java 异步 I/O
Java 中的异步 I/O 简称 AIO, A 即 Asynchronous.AIO 在 JDK1.7 时引入,基于操作系统提供的异步 I/O 通信模型,封装了一些进行异步 I/O 操作的 API. ...
- Unable to open 'free_base.cpp': Unable to read file 'c:\Program Files\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\heap\free_base.cpp'
问题 vscode编写C++程序,使用microsoft C++ Unable to open 'cvt.cpp': Unable to read file 'c:\Program Files\Mic ...
- 实习之bii--总体感受体验
在bii实习了一个暑假,感受收获都不少,记录一下. 首先当时面试时其实说的比较多的是sdn,结果来了以后主要在搞DNS,介绍一下所做的工作为何吧.bii名为北京下一代互联网工程中心,由于IPV6的逐渐 ...
- shell $用法
$0 这个程式的执行名字$n 这个程式的第n个参数值,n=1..9$* 这个程式的所有参数,此选项参数可超过9个.$# 这个程式的参数个数$$ 这个程式的PID(脚本运行的当前进程ID号)$! 执行上 ...
- 什么是以特性为核心的持续交付|阿里巴巴DevOps实践指南
编者按:本文源自阿里云云效团队出品的<阿里巴巴DevOps实践指南>,扫描上方二维码或前往:https://developer.aliyun.com/topic/devops,下载完整版电 ...
- setcontext+orw
setcontext+orw 大致可以把2.27,2.29做为两个分界点. 我们先来讨论 2.27 及以下的 setcontext + orw 的写法. 首先 setcontext 是什么?了解过 S ...