?数据库要求
数据库版本不对,zabbix-server启动不起来
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. |
ZABBIX VERSION
debian 12 zabbix 6.0LTS# wget https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-5+debian12_all.deb
# dpkg -i zabbix-release_6.0-5+debian12_all.deb
# apt update
# apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
Make sure you have database server up and running.
Run the following on your database host.
# mysql -uroot -p
password
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;
On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
Disable log_bin_trust_function_creators option after importing database schema.
# mysql -uroot -p
password
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;
Edit file /etc/zabbix/zabbix_server.conf
DBPassword=password
Start Zabbix server and agent processes and make it start at system boot.
# systemctl restart zabbix-server zabbix-agent apache2
# systemctl enable zabbix-server zabbix-agent apache2
The default URL for Zabbix UI when using Apache web server is http://host/zabbix