zabbix 解决中文字符集乱码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
如果不行的话更改阿里的epel源:wget -P  /etc/yum .repos.d/ http: //mirrors .aliyun.com /repo/epel-6 .repo  
在zabbix服务器端安装开源的字符集
[root@lb01 ~] # yum -y install  wqy-microhei-fonts
[root@lb01 ~] # 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
[root@lb01 ~]
[root@lb01 ~] # 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
[root@lb01 ~] #                                                                   #删除默认软连接指向的字符集,指向安装的字符集
[root@lb01 ~] # rm -f /etc/alternatives/zabbix-web-font
[root@lb01 ~] # ln -s /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /etc/alternatives/zabbix-web-font
[root@lb01 ~] # 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
[root@lb01 ~]
 
不要忘记重启zabbix-server
 
 
第二种方法
C:\Windows\Fonts  windows字符集考出来一个
  /usr/share/zabbix/fonts    zabbix的字符集
[root@zabbix-server fonts] # ls
graphfont.ttf
[root@zabbix-server fonts] #  
  [root@zabbix-server fonts] # ls
graphfont.ttf  STZHONGS.TTF
[root@zabbix-server fonts] # \mv STZHONGS.TTF   graphfont.ttf
[root@zabbix-server fonts] # systemctl  restart  zabbix-server 
[root@zabbix-server fonts] #









本文转自 小小三郎1 51CTO博客,原文链接:http://blog.51cto.com/wsxxsl/1903213,如需转载请自行联系原作者
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值