fsfss21 发表于 2017-3-6 13:20:24

zabbix 解决中文字符集乱码

如果不行的话更改阿里的epel源:wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo
在zabbix服务器端安装开源的字符集
# yum -y installwqy-microhei-fonts
# rpm -ql wqy-microhei-fonts
/etc/fonts/conf.d/65-0-wqy-microhei.conf
/usr/share/doc/wqy-microhei-fonts-0.2.0
/usr/share/doc/wqy-microhei-fonts-0.2.0/LICENSE_Apache2.txt
/usr/share/doc/wqy-microhei-fonts-0.2.0/LICENSE_GPLv3.txt
/usr/share/doc/wqy-microhei-fonts-0.2.0/README.txt
/usr/share/fontconfig/conf.avail/65-0-wqy-microhei.conf
/usr/share/fonts/wqy-microhei
/usr/share/fonts/wqy-microhei/wqy-microhei.ttc
#
# ll   /etc/alternatives/zabbix-web-font    ##zabbix默认的字符集
lrwxrwxrwx 1 root root 38 May 30 17:13 /etc/alternatives/zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf
#                                                                   #删除默认软连接指向的字符集,指向安装的字符集
# rm -f /etc/alternatives/zabbix-web-font
# ln -s /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /etc/alternatives/zabbix-web-font
# ll   /etc/alternatives/zabbix-web-font
lrwxrwxrwx 1 root root 46 May 30 22:12 /etc/alternatives/zabbix-web-font -> /usr/share/fonts/wqy-microhei/wqy-microhei.ttc
#

不要忘记重启zabbix-server


第二种方法
C:\Windows\Fontswindows字符集考出来一个
/usr/share/zabbix/fonts   zabbix的字符集
# ls
graphfont.ttf
#
# ls
graphfont.ttfSTZHONGS.TTF
# \mv STZHONGS.TTF   graphfont.ttf
# systemctlrestartzabbix-server
#


页: [1]
查看完整版本: zabbix 解决中文字符集乱码