选择Zabbix服务器的平台
下载Zabbix 6.0 LTS for Rocky Linux 8, MySQL, Apache
6.0/rocky_linux/8/server_frontend_agent/mysql/apache
a. Install Zabbix repository
rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-4.el8.noarch.rpm
dnf clean all
b. 安装Zabbix server,Web前端,agent
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent zabbix-agent2 zabbix-agent2-plugin-*
c. 创建初始数据库
mysql -uroot -ppassword
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
mysql -uroot -ppassword
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;
d. 为Zabbix server配置数据库
vi /etc/zabbix/zabbix_server.conf
DBPassword=password
e. 启动Zabbix server和agent进程
systemctl restart zabbix-server zabbix-agent2 httpd php-fpm
systemctl enable zabbix-server zabbix-agent2 httpd php-fpm
systemctl status zabbix-server zabbix-agent2 httpd php-fpm
默认账号Admin
默认密码为zabbix
一键安装 Zabbix Server 6.0-王晓春老师 (wangxiaochun.com)
安装后不能更改到中文
yum reinstall glibc-common
yum install langpacks-zh_CN.noarch
locale -a
Grafana
grafana-cli plugins install alexanderzobnin-zabbix-app