Zabbix6.2.3安装部署
该文档仅用于指导Zabbix6环境准备和测试学习,在安装过程如有问题请参考官方手册-----下载Zabbix
环境准备
Red Hat Enterprise Linux 8.2、Mysql8、Zabbix6.2、php-fpm-7.4
操作系统
# hostnamectl status
Static hostname: zbserver
Icon name: computer-vm
Chassis: vm
Machine ID: 85d7d85a9ae6470392b4c5fb5ba4b489
Boot ID: 927ee4f64e554b629c23b780d9ce612a
Virtualization: vmware
Operating System: Red Hat Enterprise Linux 8.2 (Ootpa)
CPE OS Name: cpe:/o:redhat:enterprise_linux:8.2:GA
Kernel: Linux 4.18.0-193.el8.x86_64
Architecture: x86-64
关闭防火墙及SELINUX
# systemctl stop firewalld.service
# systemctl disable firewalld.service
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
# cat /etc/selinux/config #修改该文件,SELINUX=disabled ,永久关闭SELINUX
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
注意:修改后需重启后生效,临时关闭SELINUX命令为:setenforce 0
配置yum源
# wget -O /etc/yum.repos.d/redhat.repo http://mirrors.aliyun.com/repo/Centos-8.repo
--2022-10-15 09:51:48-- http://mirrors.aliyun.com/repo/Centos-8.repo
正在解析主机 mirrors.aliyun.com (mirrors.aliyun.com)... 240e:95c:2002:6:3::3fd, 240e:95c:2002:6:3::3fe, 121.14.152.236, ...
正在连接 mirrors.aliyun.com (mirrors.aliyun.com)|240e:95c:2002:6:3::3fd|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:2590 (2.5K) [application/octet-stream]
正在保存至: “/etc/yum.repos.d/redhat.repo”
/etc/yum.repos.d/redhat.repo 100%[===========================================================>] 2.53K --.-KB/s 用时 0.001s
2022-10-15 09:51:48 (2.27 MB/s) - 已保存 “/etc/yum.repos.d/redhat.repo” [2590/2590]
# rpm -Uvh https://repo.zabbix.com/zabbix/6.2/rhel/8/x86_64/zabbix-release-6.2-3.el8.noarch.rpm
获取https://repo.zabbix.com/zabbix/6.2/rhel/8/x86_64/zabbix-release-6.2-3.el8.noarch.rpm
警告:/var/tmp/rpm-tmp.nIiNko: 头V4 RSA/SHA512 Signature, 密钥 ID a14fe591: NOKEY
Verifying... ################################# [100%]
准备中... ################################# [100%]
正在升级/安装...
1:zabbix-release-6.2-3.el8 ################################# [100%]
更新yum源
# dnf clean all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
0 文件已删除
# yum makecache
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
CentOS-8 - Base - mirrors.aliyun.com 1.3 MB/s | 4.6 MB 00:03
CentOS-8 - Extras - mirrors.aliyun.c 39 kB/s | 10 kB 00:00
CentOS-8 - AppStream - mirrors.aliyu 2.7 MB/s | 8.4 MB 00:03
Zabbix Official Repository (Agent2 P 803 B/s | 1.3 kB 00:01
Zabbix Official Repository - x86_64 27 kB/s | 58 kB 00:02
Zabbix Official Repository (non-supported) - x86_64 758 B/s | 1.2 kB 00:01
元数据缓存已建立。
应用及数据库安装
安装yum-utils包
# yum install yum-utils
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
上次元数据过期检查:0:00:59 前,执行于 2022年10月15日 星期六 10时00分55秒。
依赖关系解决。
………………………………
Zabbix应用安装
# dnf module switch-to php:7.4
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
上次元数据过期检查:0:07:16 前,执行于 2022年10月15日 星期六 10时00分55秒。
依赖关系解决。
# yum install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
Mysql数据库安装
# yum -y install mysql-server
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
上次元数据过期检查:0:03:35 前,执行于 2022年10月15日 星期六 10时00分55秒。
依赖关系解决。
………………………………
# mysqld --initialize –console #初始化数据库
# chown -R mysql:mysql /var/lib/mysql #授权
# systemctl start mysqld #启动数据库
# cat /var/log/mysql/mysqld.log | grep localhost #查看数据库初始化密钥
2022-10-15T14:45:19.126155Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: SibBrDvq1D&a
# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.26
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> alter user 'root'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.01 sec)
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
Query OK, 1 row affected (0.01 sec)
mysql> create user zabbix@localhost identified by 'password';
Query OK, 0 rows affected (0.01 sec)
mysql> grant all privileges on zabbix.* to zabbix@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql> set global log_bin_trust_function_creators = 1;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
导入初始架构和数据,系统将提示您输入新创建的密码。
# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
配置数据库
为Zabbix server配置数据库,编辑配置文件 /etc/zabbix/zabbix_server.conf
DBPassword=password
服务启动
启动Zabbix server和agent进程,并为它们设置开机自启:
# systemctl restart zabbix-server zabbix-agent httpd php-fpm
# systemctl enable zabbix-server zabbix-agent httpd php-fp
访问web前端
连接到新安装的Zabbix前端: http://IP/zabbix。根据个人习惯选择语言,我这里选择中文,点击下一步。
确保下图值都是“OK”
输入数据库配置密码,其他保持默认即可,该测试环境仅一台系统。
zabbix的名称输入系统主机名即可。
至此安装完成,下图登录验证即可。默认用户名及密码:user:Admin ps: zabbix
版本查看
# zabbix_server -V
zabbix_server (Zabbix) 6.2.3
Revision 98ee88fc19d 21 September 2022, compilation time: Sep 21 2022 10:26:52
Copyright (C) 2022 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).
Compiled with OpenSSL 1.1.1k FIPS 25 Mar 2021
Running with OpenSSL 1.1.1c FIPS 28 May 2019
# php-fpm -v
PHP 7.4.19 (fpm-fcgi) (built: May 4 2021 11:06:37)
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 45
Server version: 8.0.26 Source distribution
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> exit
Bye
错误处理
问题1zabbix-server启动报错
# systemctl start zabbix-server
Job for zabbix-server.service failed because the control process exited with error code.
See "systemctl status zabbix-server.service" and "journalctl -xe" for details.
# journalctl -xe
-- Support: https://access.redhat.com/support
--
-- zabbix-server.service 单元已失败。
--
-- 结果为“failed”。
解决:升级net-snmp到高版本
# yum localinstall -y net-snmp-5.8-22.el8.x86_64.rpm
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
上次元数据过期检查:0:02:18 前,执行于 2022年10月15日 星期六 10时59分11秒。
依赖关系解决。
…………………………………………
Zabbix6.2.3安装部署相关推荐
- Rocky 9.1操作系统实现zabbix6.0的安装部署实战
文章目录 前言 一. 实验环境 二. 安装zabbix过程 2.1. 安装zabbix源 2.2 安装zabbix相关的软件 2.3 安装数据库并启动 2.4 开始初始化数据库: 2.5 创建数据库实 ...
- CENT OS 8 Stream 安装部署 Zabbix 6.0 LTS
CENT OS 8 Stream 安装部署 Zabbix 6.0 LTS Zabbix架构 信息汇总 CentOS 8 Stream 部署Zabbix6.0 替换CentOS8源为阿里源 替换Cent ...
- Zabbix 6.0 图文安装部署讲解---LNMP环境
Zabbix 6.0 图文安装部署讲解---LNMP环境 简介 环境需求 部署环境 关闭系统防火墙 一.Mysql8.0.30 部署 二.nginx 部署 三.PHP 部署 四.zabbix-serv ...
- 2021年大数据Flink(三):Flink安装部署 Local本地模式
目录 Flink安装部署 Local本地模式 原理 操作 测试 Flink安装部署 Flink支持多种安装模式 - Local-本地单机模式,学习测试时使用 - Standalone-独立集群模式,F ...
- Mycat 读写分离 数据库分库分表 中间件 安装部署,及简单使用
MyCat是一个开源的分布式数据库系统,是一个实现了MySQL协议的服务器,前端用户可以把它看作是一个数据库代理,用MySQL客户端工具和命令行访问,而其后端可以用MySQL原生协议与多个MySQL服 ...
- 【SVN】1. SVN 安装部署
一. SVN概述 1. SVN 简介 Subversion 版本控制系统 简称 SVN. SVN 是一个跨平台开放源代码的集中式版本控制系统,可以实现文件及目录的保存及版本回溯. SVN ...
- Docker概述和安装部署
概述 Docker产生的背景 一款产品从开发到上线,从操作系统,到运行环境,再到应用配置.作为开发+运维之间的协作我们需要关心很多东西,这也是很多互联网公司都不得不面对的问题,特别是各种版本的迭代之后 ...
- DSVS7050签名服务器的网站,吉大正元数字签名服务器-安装部署手册(COM版 VCTK_S接口)2.1.1.doc...
吉大正元数字签名服务器-安装部署手册(COM版 VCTK_S接口)2.1.1 数字签名服务器v2.1.1 安装部署手册 (VSTK接口 COM版) V2.1.1 长 春 吉 大 正 元 信 息 技 术 ...
- Airflow安装部署
Airflow安装部署 新闻信息是通过爬虫获取,使用scrapy框架进行爬虫任务:使用airflow工作流监控平台对爬虫任务进行管理.监控(可使用CeleryExecutor分布式,也可使用Local ...
最新文章
- 为什么需要在TypedArray后调用recycle
- sql的limit用法
- [Redux/Mobx] 为什么redux能做到局部渲染呢?
- css让背景图片显示透明遮罩_CSS项目测试(支持深色模式)
- python模拟抛硬币_python实现简单随机模拟——抛呀抛硬币
- Linux笔记-解决iptables配置后,本机无法访问本机,本机无法访问其他主机问题
- mysql 错误收集和整理
- MySQL高级知识(七)——索引面试题分析
- Python 2.7 将在 2020 年终止所有支持!
- Spring Cloud Zuul--服务网关
- php中在页面显示多选的内容,在html页面的表单选项中如何能有多选功能?(示例)...
- java 8.0_java8_java8下载64位v8.0 官方版下载-无限下载
- 6款强烈推荐的PDF阅读器
- 软考嵌入式系统设计师2013年上午试题总结
- 空间两直线间最短距离计算公式
- 只能吃土豆的牛牛(二进制枚举)
- tesseract-ocr在mac下的使用汇总
- TGRS2022/云检测:Unsupervised Domain Adaptation for Cloud Detection Based on Grouped Features Alignment
- 多元线性回归方程原理及其推导
- PC usb蓝牙发射器