1.踩坑说明
老胡让我帮他部署个CentOS8的Zabbix6,我说这还不是洒洒水的事儿嘛,无奈打脸来得太快。
网络的坑:移动网络,打死都不可达;
系统的坑:CentOS8 Stream是什么鬼;
开源的坑:官方源贼慢,三方源报错;
版本的坑:大坑套小坑,小小坑还坑。
我说要不就弄个CentOS7的Zabbix 5.0 LTS得了,十几分钟就完事。
老胡说,不嘛不嘛,就要Zabbix 6,Web界面贼好看。
2.爬坑记录
Zabbix 6.0要求CentOS≧8,MySQL≧8.0或MariaDB≧10.5.0
Zabbix 6.2及之后版本增加要求PHP≧7.4
Epel源各种报错。
3.避坑部署
3.1 Zabbix官方源
# rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-4.el8.noarch.rpm # dnf clean all
3.2 安装Zabbix服务
# dnf install -y zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
3.3 MariaDB数据库
编辑/etc/yum.repos.d/mariadb.repo
[mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.8/centos8-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
部署MariaDB Server
# dnf install -y mariadb-server # systemctl start mariadb # systemctl enable mariadb
# mysql_secure_installation
创建Zabbix数据库
# mysql -uroot -p password mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin; mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; mysql> set global log_bin_trust_function_creators = 1; mysql> set global log_bin_trust_function_creators = 0; mysql> \q;
导入zabbix库表
# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
编辑/etc/zabbix/zabbix_server.conf
DBPassword=zabbix
启动Zabbix相关服务
# systemctl restart zabbix-server zabbix-agent httpd php-fpm # systemctl enable zabbix-server zabbix-agent httpd php-fpm
Web登录Zabbix:http://host/zabbix
默认账号密码:Admin/zabbix
标签:MariaDB,部署,Zabbix6.0,Zabbix,server,zabbix,全过程,mysql,mariadb From: https://www.cnblogs.com/niuyx/p/17235087.html