Zabbix 管理界面中文出现乱码解决方法

1.、复制本地电脑C:\Windows\Fonts\MSYHBD.ttf  上传到zabbix服务器网站目录的fonts目录下

2.zabbix网站目录fonts目录查找如下

[root@zabbix-server ~]# whereis zabbix
zabbix: /usr/lib/zabbix /etc/zabbix /usr/share/zabbix

[root@zabbix-server ~]# cd /usr/share/fonts/dejavu/
[root@zabbix-server dejavu]# ll
total 52768
-rw-r--r-- 1 root root 611212 Feb 27 2011 DejaVuSans-BoldOblique.ttf
-rw-r--r-- 1 root root 672300 Feb 27 2011 DejaVuSans-Bold.ttf
-rw-r--r-- 1 root root 580168 Feb 27 2011 DejaVuSansCondensed-BoldOblique.ttf
-rw-r--r-- 1 root root 631992 Feb 27 2011 DejaVuSansCondensed-Bold.ttf
-rw-r--r-- 1 root root 576004 Feb 27 2011 DejaVuSansCondensed-Oblique.ttf
-rw-r--r-- 1 root root 643852 Feb 27 2011 DejaVuSansCondensed.ttf
-rw-r--r-- 1 root root 345204 Feb 27 2011 DejaVuSans-ExtraLight.ttf
-rw-r--r-- 1 root root 611556 Feb 27 2011 DejaVuSans-Oblique.ttf
-rw-r--r-- 1 root root 720012 Feb 27 2011 DejaVuSans.ttf

3.DejaVuSans.ttf是zabbix默认字符集,现在需要把PC拿到的字体上传到usr/share/fonts/dejavu/这个目录下

[root@zabbix-server dejavu]# ll
total 52768
-rw-r--r-- 1 root root 611212 Feb 27 2011 DejaVuSans-BoldOblique.ttf
-rw-r--r-- 1 root root 672300 Feb 27 2011 DejaVuSans-Bold.ttf
-rw-r--r-- 1 root root 580168 Feb 27 2011 DejaVuSansCondensed-BoldOblique.ttf
-rw-r--r-- 1 root root 631992 Feb 27 2011 DejaVuSansCondensed-Bold.ttf
-rw-r--r-- 1 root root 576004 Feb 27 2011 DejaVuSansCondensed-Oblique.ttf
-rw-r--r-- 1 root root 643852 Feb 27 2011 DejaVuSansCondensed.ttf
-rw-r--r-- 1 root root 345204 Feb 27 2011 DejaVuSans-ExtraLight.ttf
-rw-r--r-- 1 root root 611556 Feb 27 2011 DejaVuSans-Oblique.ttf
-rw-r--r-- 1 root root 720012 Feb 27 2011 DejaVuSans.ttf.bak   
-rw-r--r-x 1 root root 16829116 Apr 12 2018 MSYHBD.ttf    这里要留意拷贝进入的字体的权限,最好给777。要不会影响到zabbix图形显示异常


4.切换至/etc/alternatives,就可以看到默认软链接指向的字符集

5、删除默认软链接的字符集,指向新安装的字符集

rm -f /etc/alternatives/zabbix-web-font

ln -s /usr/share/fonts/dejavu/MSYH.ttf  /etc/alternatives/zabbix-web-font

6、重启zabbix-server服务

systemctl restart zabbix-server

7.web端确认成功

猜你喜欢

转载自www.cnblogs.com/bidad/p/11624685.html