1、 启用中文 vi /usr/share/zabbix/include/locales.inc.php 把zh_CN后面参数写true 然后去web界面选择语言。如果,去选择语言的时候,你发现还是不能选择. 提示: You are not able to choose some of the languages, because locales for them are not installed on the web server. 是因为你系统里没中文环境 那么:设置中文环境 第一步,安装中文包:apt-get install language-pack-zh-hant language-pack-zh-hans 第二步,配置相关环境变量: vi /etc/environment 在文件中增加语言和编码的设置: LANG="zh_CN.UTF-8" LANGUAGE="zh_CN:zh:en_US:en" 第三步,重新设置本地配置:dpkg-reconfigure locales 现在重启apache&zabbix_server两个服务一下,就可以选了。
或者使用以下的方法: 进入cd /usr/share/zabbix/locale/zh_CN/LC_MESSAGES目录 unzip master.zip rm frontend.mo cp zabbix-zh_CN-master/frontend.mo frontend.mo 现在重启apache&zabbix_server两个服务 service zabbix-server restart service apache2 restart 也可以解决
2、 乱码问题 看图时候,如果有中文,会乱码 调整图像里的中文乱码 下载雅黑 解压缩文件 rar x dd.rar cp dd/msyh.ttf msyh.ttf 然后修改 vi /usr/share/zabbix/include/defines.inc.php 找到 define('ZBX_GRAPH_FONT_NAME', 'graphfont'); // font file name 修改成: define('ZBX_GRAPH_FONT_NAME', 'msyh'); // font file name cp msyh.ttf /usr/share/zabbix/fonts #少了这一步则图形下面没有字体 重启apache服务即可
技术交流欢迎加入Q群:177428068
|