Zabbix Chinese font to solve the garbage problem locally
problem:
When zabbix Web interface to switch Chinese font, the emergence of local Chinese garbled:
the reason:
1, when the initialization of the database is not used due to utf8 encoding. Initialize the database using the command
create database zabbix default charset utf8;
Or increase follows my.cnf
default-character-set = utf8
2, zabbix use DejaVuSan.ttf fonts, does not support Chinese, leading Chinese garbled.
Solve (Cause 2):
download Chinese fonts from local windows system, such as conventional italics:
C:\Windows\Fonts\simkai.ttf
Zabbix uploaded to the fonts directory,
/usr/share/zabbix/fonts/
zabbix default font is DejaVuSans.ttf:
/usr/share/zabbix/fonts/graphfont.ttf -> /etc/alternatives/zabbix-web-font
/etc/alternatives/zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf
Zaibbix modify configuration files
# vim /usr/share/zabbix/include/defines.inc.php
define('ZBX_GRAPH_FONT_NAME', 'graphfont'); // font file name
改为:
// define('ZBX_GRAPH_FONT_NAME', 'graphfont'); // font file name
define('ZBX_GRAPH_FONT_NAME', 'simkai'); // font file name
or
到/usr/share/zabbix/fonts/目录下备份graphfont.ttf软连接文件,把simkai.ttf直接改为graphfont.ttf;
Note: zabbix4
The path consists of /usr/share/zabbix/fonts/
to /usr/share/zabbix/assets/fonts
;