中文显示问题,图表乱码
解决办法:
[root@zabbix ~]# cd /usr/share/zabbix/include/
[root@zabbix include]# vim locales.inc.php
58 'zh_CN' => array('name' => _('Chinese (zh_CN)'), 'display' => true), 安装字体
[root@zabbix ~]# yum -y install wqy-microhei-fonts
[root@zabbix ~]# cd /etc/alternatives/
[root@zabbix alternatives]# ll zabbix-web-font
lrwxrwxrwx. 1 root root 38 Jun 6 00:22 zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf
[root@zabbix alternatives]# rm -f zabbix-web-font
[root@zabbix alternatives]# 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@zabbix alternatives]# ln -s /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /etc/alternatives/zabbix-web-font
刷新之后,显示正常
若yum没有发现字体,可以先安装yum源
\cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
wget -qO /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
yum clean metadata