zbx图形方块问题处理

在Zabbix中,修改了图形字体路径定义为ZBX_FONTPATH指向的simkai.ttf文件,并通过alternatives系统创建软链接,以解决方块字问题。安装simkai字体,刷新页面后,方块字消失。
摘要由CSDN通过智能技术生成

图形方块问题
web常量定义文件
vi /usr/share/zabbix/include/defines.inc.php
找到图形字体文件
define('ZBX_FONTPATH',                          realpath('assets/fonts')); // where to search for font (GD > 2.0.18)
define('ZBX_GRAPH_FONT_NAME',           'graphfont'); // font file name

[root@zbxlnmpt01 fonts]# cd /usr/share/zabbix/assets/fonts

[root@zbxlnmpt01 fonts]# ls -lacit
total 0
33619700 drwxr-xr-x. 2 root root 27 Apr 27 23:12 .
33620013 lrwxrwxrwx. 1 root root 33 Apr 27 23:12 graphfont.ttf -> /etc/alternatives/zabbix-web-font
17212955 drwxr-xr-x. 5 root root 44 Apr 27 23:12 ..

[root@zbxlnmpt01 fonts]# cd /etc/alternatives
[root@zbxlnmpt01 alternatives]# ls -alcit
total 16
16777281 drwxr-xr-x. 79 root root 8192 Apr 27 23:13 ..
   33704 drwxr-xr-x.  2 root root 4096 Apr 27 23:12 .
 1316907 lrwxrwxrwx.  1 root root   38 Apr 27 23:12 zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf
    1313 lrwxrwxrwx.  1 root root   29 Apr 27 23:06 zabbix-server -> /usr/sbin/zabbix_server_mysql
   11138 lrwxrwxrwx.  1 root root   25 Apr 27 22:52 mysqlbug -> /usr/lib64/mysql/mysqlbug
  778834 lrwxrwxrwx.  1 root root   40 Apr 27 21:52 mta-aliasesman -> /usr/share/man/man5/aliases.postfix.5.gz
  778824 lrwxrwxrwx.  1 root root   22 Apr 27 21:52 mta-mailq -> /usr/bin/mailq.postfix
  778830 lrwxrwxrwx.  1 root root   38 Apr 27 21:52 mta-mailqman -> /usr/share/man/man1/mailq.postfix.1.gz
  778825 lrwxrwxrwx.  1 root root   27 Apr 27 21:52 mta-newaliases -> /usr/bin/newaliases.postfix
  778832 lrwxrwxrwx.  1 root root   43 Apr 27 21:52 mta-newaliasesman -> /usr/share/man/man1/newaliases.postfix.1.gz
  778826 lrwxrwxrwx.  1 root root   23 Apr 27 21:52 mta-pam -> /etc/pam.d/smtp.postfix
  778827 lrwxrwxrwx.  1 root root   22 Apr 27 21:52 mta-rmail -> /usr/bin/rmail.postfix
  778828 lrwxrwxrwx.  1 root root   25 Apr 27 21:52 mta-sendmail -> /usr/lib/sendmail.postfix
  778833 lrwxrwxrwx.  1 root root   41 Apr 27 21:52 mta-sendmailman -> /usr/share/man/man1/sendmail.postfix.1.gz
  778823 lrwxrwxrwx.  1 root root   26 Apr 27 21:52 mta -> /usr/sbin/sendmail.postfix
  380298 lrwxrwxrwx.  1 root root   15 Apr 27 21:51 ld -> /usr/bin/ld.bfd
   42628 lrwxrwxrwx.  1 root root   34 Apr 27 21:51 libnssckbi.so.x86_64 -> /usr/lib64/pkcs11/p11-kit-trust.so

[root@zbxlnmpt01 fonts]# mkdir -p /usr/share/fonts/simkai
[root@zbxlnmpt01 fonts]# cd /usr/share/fonts/simkai
[root@zbxlnmpt01 simkai]# yum install -y lrzsz
上传simkai字体文件
[root@zbxlnmpt01 simkai]# cd /etc/alternatives
ln -snf /usr/share/fonts/simkai/simkai.ttf /etc/alternatives/zabbix-web-font

[root@zbxlnmpt01 alternatives]# ls -lacit
total 16
   33704 drwxr-xr-x.  2 root root 4096 Apr 28 00:34 .
  334116 lrwxrwxrwx.  1 root root   34 Apr 28 00:34 zabbix-web-font -> /usr/share/fonts/simkai/simkai.ttf
页面刷新后方块字没有了

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值