Zabbix 4.4管理界面中文乱码解决方法
1.zabbix 4.4 安装配置过程可参考官方文档:
文档链接地址:https://www.zabbix.com/download?zabbix=4.4&os_distribution=centos&os_version=7&db=mysql
2.Zabbix 4.4 安装完成之后,监控图形页面出现字符集乱码,如下所示:
解决方法:
《1》C:\Windows\Fonts\微软雅黑 常规 字体上传到zabbix服务器zabbix-web-font 目录下,
《2》zabbix 的安装目录如下:
[root@docker /]# whereis zabbix
zabbix: /usr/lib/zabbix /etc/zabbix /usr/share/zabbix
切换到/usr/share/zabbix 目录,
[root@docker zabbix]# cd /usr/share/zabbix/
[root@docker zabbix]# ls
actionconf.php adm.workingtime.php chart4.php favicon.ico httpdetails.php local robots.txt sysmaps.php
adm.gui.php api_jsonrpc.php chart5.php graphs.php image.php locale screenconf.php templates.php
adm.housekeeper.php app chart6.php history.php imgstore.php maintenance.php screenedit.php toptriggers.php
adm.iconmapping.php applications.php chart7.php host_discovery.php include map.import.php screen.import.php tr_events.php
adm.images.php assets chart.php hostgroups.php index_http.php map.php screens.php trigger_prototypes.php
adm.macros.php audio charts.php hostinventoriesoverview.php index.php overview.php services.php triggers.php
adm.other.php auditacts.php conf hostinventories.php items.php php.php setup.php usergrps.php
adm.regexps.php auditlogs.php conf.import.php host_prototypes.php js profile.php slideconf.php users.php
adm.triggerdisplayoptions.php browserwarning.php correlation.php host_screen.php jsLoader.php queue.php slides.php zabbix.php
adm.triggerseverities.php chart2.php discoveryconf.php hosts.php jsrpc.php report2.php srv_status.php
adm.valuemapping.php chart3.php disc_prototypes.php httpconf.php latest.php report4.php sysmap.php
发现并未有存放字体fonts目录,于是手动创建fonts目录,将字体文件上传至此目录下。
[root@docker zabbix]# mkdir -p /usr/share/zabbix/fonts
使用rz -y 命令将字体文件msyh.ttf 上传至该目录;
[root@docker fonts]# ls
msyh.ttf
《3》切换至目录/etc/alternatives/ ,可以看到zabbix-web-font文件实际上是一个软连接,链接的文件实际位置是:/usr/share/fonts/dejavu/DejaVuSans.ttf 。
[root@docker /]# ll /etc/alternatives/zabbix-web-font
lrwxrwxrwx. 1 root root 38 Aug 19 13:45 /etc/alternatives/zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf
这里我们删除默认软连接的字符集,指向刚刚新安装的字符集路径。
[root@docker fonts]# ll /etc/alternatives/zabbix-web-font
lrwxrwxrwx. 1 root root 38 Aug 19 13:45 /etc/alternatives/zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf
[root@docker fonts]# rm -rf /etc/alternatives/zabbix-web-font
[root@docker fonts]# ln -s /usr/share/zabbix/fonts/msyh.ttf /etc/alternatives/zabbix-web-font
[root@docker fonts]# ll /etc/alternatives/zabbix-web-font
lrwxrwxrwx. 1 root root 32 Aug 20 12:25 /etc/alternatives/zabbix-web-font -> /usr/share/zabbix/fonts/msyh.ttf
《4》修改系统配置文件,让web页面支持简体中文显示
[root@docker fonts]# vim /usr/share/zabbix/include/locales.inc.php
找到如下所示:
'zh_CN' => ['name' => _('Chinese (zh_CN)'), 'display' => false], 修改为
'zh_CN' => ['name' => _('Chinese (zh_CN)'), 'display' => true],
将false 改为true, 保存退出。
《5》重启zabbix-server 服务
[root@docker fonts]# systemctl restart zabbix-server
《6》退出并重新登录WEB,查看图形,显示正常。
另外还有一种情况就是安装配置MySQL数据库的时候,没有指定MySQL数据库的字符集。如下所示:
[root@docker fonts]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1838
Server version: 5.6.45 MySQL Community Server (GPL) Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> status;
--------------
mysql Ver 14.14 Distrib 5.6.45, for Linux (x86_64) using EditLine wrapper Connection id: 1838
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.6.45 MySQL Community Server (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 2 hours 13 min 16 sec Threads: 26 Questions: 134782 Slow queries: 0 Opens: 168 Flush tables: 1 Open tables: 161 Queries per second avg: 16.856
--------------
设置MySQL数据库字符集为UTF8模式,MySQL数据库修改字符集的方法。在/etc/my.cnf 的【mysqld】端加入如下代码:
[mysqld]
character-set-server=utf8
保存退出,重启MySQL数据库服务即可。
至此,Zabbix 4.4 图像乱码问题解决 。
Zabbix 4.4管理界面中文乱码解决方法的更多相关文章
- Zabbix4.0 Web管理界面中文乱码解决方法(转)
Zabbix安装好之后,监控图形页面出现字符集乱码 解决方法:1.复制本地电脑C:\Windows\Fonts\simkai.ttf(楷体)上传到zabbix服务器网站目录的fonts目录下 2.za ...
- zabbix 监控 图形化界面文字乱码解决方法
zabbix安装后之后,很多小伙伴第一时间都是去设置中文界面,发现页面.菜单等可以正常显示中文,但是 唯有图形显示方块,无法正常显示汉字,按照百度教程,上传windows字体,修改配置文件的2处字体配 ...
- Django 分页查询并返回jsons数据,中文乱码解决方法
Django 分页查询并返回jsons数据,中文乱码解决方法 一.引子 Django 分页查询并返回 json ,需要将返回的 queryset 序列化, demo 如下: # coding=UTF- ...
- php mysql 中文乱码解决方法
本文章向码农们介绍php mysql 中文乱码解决方法,对码农们非常实用,需要的码农可以参考一下. 从MySQL 4.1开始引入多语言的支持,但是用PHP插入的中文会出现乱码.无论用什么编码也不行 解 ...
- jquery的ajax()函数传值中文乱码解决方法介绍
jquery的ajax()函数传值中文乱码解决方法介绍,需要的朋友可以参考下 代码如下: $.ajax({ dataType : ‘json', type : ‘POST', url : ‘http: ...
- [转]mysql导入导出数据中文乱码解决方法小结
本文章总结了mysql导入导出数据中文乱码解决方法,出现中文乱码一般情况是导入导入时编码的设置问题,我们只要把编码调整一致即可解决此方法,下面是搜索到的一些方法总结,方便需要的朋友. linux系统中 ...
- Zxing中文乱码解决方法
Zxing中文乱码解决方法总结 尝试过非常多方法 最后发现此方法解决的乱码最多....... 在百度搜索二维码图片 经过前2页的測试 除开一张图之外 其余都能扫描出结果 假设大家有更好的解决方法 ...
- unity3d 中文乱码解决方法——cs代码文件格式批量转化UTF8
在Unity3d中经常会碰到中文乱码的问题,比如代码中的[AddComponentMenu("GameDef/AI/战机AI")],注释,中文文本等等 其原因在于,unity本身是 ...
- Codeblocks中文乱码解决方法
odeblocks中文乱码解决方法: 特别提示:出现中文乱码情况才执行以下操作,未出现请勿随意修改!!!! 打开Codeblocks -> 设置 -> 编辑器: 然后点击 Encoding ...
随机推荐
- 重新认识Appium
一.重新认识Appium 找到了学习资料,却不知道怎么实现!!! 要如何实现呢? Appium完整案例值得参考:手把手搭建环境,其中安装和配置Mave这部分有点老了. 首先下载maven 官网地址 ...
- PHP+mysql常考题
PHP+mysql常考题 来自<PHP程序员面试笔试宝典>,涵盖了近三年了各大型企业常考的PHP面试题,针对面试题提取出来各种面试知识也涵盖在了本书. 常考的mysql基础题 问题:设教务 ...
- Solution -「JOISC 2021」「LOJ #3489」饮食区
\(\mathcal{Description}\) Link. 呐--不想概括题意,自己去读叭~ \(\mathcal{Solution}\) 如果仅有 1. 3. 操作,能不能做? ...
- Solution -「CF 555E」Case of Computer Network
\(\mathcal{Description}\) Link. 给定 \(n\) 个点 \(m\) 条边的无向图,判断是否有给每条边定向的方案,使得 \(q\) 组有序点对 \((s,t)\) ...
- 中国首个进入谷歌编程之夏(GSoC)的开源项目: Casbin, 2022 年预选生招募!
Casbin 明日之星预选生计划-Talent for Casbin 2022 "Casbin 明日之星预选生计划-Talent for Casbin 2022"是什么? &quo ...
- gulp更新4.0后的报错(gulp报Did you forget to signal async completion?)
本文首发于青云工作室 原文链接为 https://qystudio.ltd/posts/55153.html 缘起 今天我升级了gulp到4.0,在git三件套之后,网站并没有更新,我便登录了gith ...
- 本塔科技借力VR Engine,提供更优质的3D VR内容
本文分享于华为开发者论坛<本塔科技借力HMS Core VR Engine,提供更优质的3D VR视频内容> 本塔科技致力于为影视行业提供优质的3D VR视频内容,追求稳定.观看感舒适.良 ...
- ORACLE-创建用户和表空间
/*分为四步 *//*第1步:创建临时表空间 */create temporary tablespace user_temp tempfile 'D:\oracle\oradata\Oracle9i\ ...
- CobaltStrike逆向学习系列(1):CS 登陆通信流程分析
这是[信安成长计划]的第 1 篇文章 关注微信公众号[信安成长计划][SecSource] 0x00 目录 0x01 密码校验 0x02 aggressor.authenticate 0x03 agg ...
- Java课程设计---修改学生基本信息
1.修改窗体 2.在StudentDao中增加修改学生信息的方法 /** * 修改的方法 * * @param student * @return * @throws SQLException */ ...