重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛

标题: zabbix5.0.47字体乱码的解决 [打印本页]

作者: 郑全    时间: 2026-4-13 11:52
标题: zabbix5.0.47字体乱码的解决
zabbix5.0.47字体乱码

以下方法在 5.0.47 下面确认
1.安装字体

yum install -y wqy-microhei-fonts

2.拷贝字体到zabbix对应字体位置

cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /var/www/html/zabbix/assets/fonts/graphfont.ttf

3.修改字体设置,位置:ZBX_GRAPH_FONT_NAME,ZBX_FONT_NAME

[root@5x7pavbj fonts]# cat /var/www/html/zabbix/include/defines.inc.php|grep -i font
define('ZBX_FONTPATH',                          realpath('assets/fonts')); // where to search for font (GD > 2.0.18)
//define('ZBX_GRAPH_FONT_NAME',         'DejaVuSans'); // font file name
define('ZBX_GRAPH_FONT_NAME',           'graphfont'); // font file name
//define('ZBX_FONT_NAME', 'DejaVuSans');
define('ZBX_FONT_NAME', 'graphfont');
define('ZBX_PREG_DEF_FONT_STRING', '/^[0-9\.:% ]+$/');
define('ZBX_STYLE_MONOSPACE_FONT', 'monospace-font');

4.重启httpd

systemctl restart httpd

再看,已经OK.




欢迎光临 重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2