Problems and solutions in zabbix installation

I recently installed zabbix 5.0LTS using CentOS7.7 environment. Now I will record some long-running problems encountered during the installation process and their solutions for reference.

1)
Regarding the installation of zabbix, a lot has been introduced in its official documents or other materials, but for the key step: creating the initial database, the official information only mentions a simple sentence: Make sure you have database server up and running.

At the beginning of this step, mariadb was configured (installed in rpm mode), but in the subsequent "Configure Zabbix front-end" operation, when connecting to the database, it kept prompting Incorrect default
charset for zabbix database: "utf8mb3" instead "utf8"

According to various information found on the Internet, modifying the character set cannot solve this problem.
Finally, this problem was solved by installing mariadb from source code.
(I also compared the contents of the database tables after the two installation methods, and found that it is indeed only after the MariaDB source code installation method that the character set required by Zabbix is ​​utf8) During this period, I also briefly tried postgresql, and this method did not work
. An error was reported saying that the character set was incorrect, but when "configure Zabbix front end" (configure DB Connection), it was prompted that the corresponding file or folder could not be found. There was no in-depth research on how to solve this problem.

2)
When authorizing the database, the official documents only

create user 'zabbix'@'localhost' identified by '<password>';
grant all privileges on zabbix.* to 'zabbix'@'localhost';

I suggest adding the hostname of the current node (the hostname here should be filled in according to the actual situation)

create user 'zabbix'@'<hotname>' identified by '<password>';
grant all privileges on zabbix.* to 'zabbix'@'<hostname>';

3)
During the process of "Configuring Zabbix front-end", I changed the localhost in the text box to the IP address of this machine. The reason is that the IP address corresponding to localhost in my hosts file is the default configuration of 127.0.0.1 . You can try it when you encounter connection problems.

Other suggestions:
If you encounter problems with database connection during the installation process, you can use Navicat Premium to diagnose and see if the user name and password settings are incorrect or the table character set does not meet the requirements.

As for other problems such as garbled characters in Zabbix, there is already a lot of information on the Internet to introduce solutions, so I won’t repeat them here.

Guess you like

Origin blog.csdn.net/haiqinma/article/details/120240224