系统环境:rockylinux8
数据库:
关闭系统的防火墙
systemctlstopfirewalldsystemctldisablefirewalld
关闭selinux
vi/etc/selinux/config打开config文件将SELINUX=enforcing改为SELINUX=disabled
执行命令:setenforce0
安装Zabbix源
rpm-Uvh
安装Zabbixserver,Web前端,agent
安装zabbix相关组件
dnfinstallzabbix-server-mysqlzabbix-web-mysqlzabbix-apache-confzabbix-sql-scriptszabbix-selinux-policyzabbix-agent
数据库部分
由于6.0的版本需要以上,所以需要安装最新的mysql源,而类CentOS8系统和9系统只需要将软件源更新至最新,mysql的版本就为8
dnf-yupdatednf-yinstallmysql-server
启动数据库
systemctlstartmysqldsystemctlenablemysqld
初始化数据库
mysql_secure_installation
创建数据库实例及对应的用户
mysql-uroot-pcreatedatabasezabbixcharactersetutf8mb4collateutf8mb4_bin;createuserzabbix@localhostidentifiedby'123321';grantallprivilegesonzabbix.*tozabbix@localhost;setgloballog_bin_trust_function_creators=1;quit;
导入初始架构和相关数据
zcat/usr/share/zabbix-sql-scripts/mysql/|mysql--default-character-set=utf8mb4-uzabbix-pzabbix
Zabbix部分配置
vim/etc/zabbix/zabbix_
数据库实例名、数据库用户与下方数据库配置一致
启动服务
systemctlrestartzabbix-serverzabbix-agenthttpdphp-fpmsystemctlenablezabbix-serverzabbix-agenthttpdphp-fpm
前端部分配置
前端的地址为http://服务器IP地址/zabbix
注意:如果没有中文语言需要进行设置
_64CentOS7yumgroupinstallchinese-support-yUbuntuapt-getinstalllanguage-pack-zh*-y





