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管理界面中文乱码解决方法的更多相关文章

  1. Zabbix4.0 Web管理界面中文乱码解决方法(转)

    Zabbix安装好之后,监控图形页面出现字符集乱码 解决方法:1.复制本地电脑C:\Windows\Fonts\simkai.ttf(楷体)上传到zabbix服务器网站目录的fonts目录下 2.za ...

  2. zabbix 监控 图形化界面文字乱码解决方法

    zabbix安装后之后,很多小伙伴第一时间都是去设置中文界面,发现页面.菜单等可以正常显示中文,但是 唯有图形显示方块,无法正常显示汉字,按照百度教程,上传windows字体,修改配置文件的2处字体配 ...

  3. Django 分页查询并返回jsons数据,中文乱码解决方法

    Django 分页查询并返回jsons数据,中文乱码解决方法 一.引子 Django 分页查询并返回 json ,需要将返回的 queryset 序列化, demo 如下: # coding=UTF- ...

  4. php mysql 中文乱码解决方法

    本文章向码农们介绍php mysql 中文乱码解决方法,对码农们非常实用,需要的码农可以参考一下. 从MySQL 4.1开始引入多语言的支持,但是用PHP插入的中文会出现乱码.无论用什么编码也不行 解 ...

  5. jquery的ajax()函数传值中文乱码解决方法介绍

    jquery的ajax()函数传值中文乱码解决方法介绍,需要的朋友可以参考下 代码如下: $.ajax({ dataType : ‘json', type : ‘POST', url : ‘http: ...

  6. [转]mysql导入导出数据中文乱码解决方法小结

    本文章总结了mysql导入导出数据中文乱码解决方法,出现中文乱码一般情况是导入导入时编码的设置问题,我们只要把编码调整一致即可解决此方法,下面是搜索到的一些方法总结,方便需要的朋友. linux系统中 ...

  7. Zxing中文乱码解决方法

    Zxing中文乱码解决方法总结 尝试过非常多方法  最后发现此方法解决的乱码最多....... 在百度搜索二维码图片 经过前2页的測试  除开一张图之外  其余都能扫描出结果 假设大家有更好的解决方法 ...

  8. unity3d 中文乱码解决方法——cs代码文件格式批量转化UTF8

    在Unity3d中经常会碰到中文乱码的问题,比如代码中的[AddComponentMenu("GameDef/AI/战机AI")],注释,中文文本等等 其原因在于,unity本身是 ...

  9. Codeblocks中文乱码解决方法

    odeblocks中文乱码解决方法: 特别提示:出现中文乱码情况才执行以下操作,未出现请勿随意修改!!!! 打开Codeblocks -> 设置 -> 编辑器: 然后点击 Encoding ...

随机推荐

  1. PTM人员(产品技术经理)

    以下是一位PTM的工作总结: 责任感 作为PTM一定要有责任感,项目中的所有事情都要作为自己的事情,如果碰到有些项目中的工作没人负责,那么就是PTM的工作没有做到位.   全局观 作为PTM一定要比普 ...

  2. python解释器的安装以及解释器多版本共存

    版本介绍 python创始人:gukido(龟叔) python1.X 原始版本,几乎不用 python2.x 最高版本2.7(2020年之后不再维护) python3.x 最高版本3.9(一般用3. ...

  3. Solution -「LOCAL」画画图

    \(\mathcal{Description}\)   OurTeam.   给定一棵 \(n\) 个点的树形随机的带边权树,求所有含奇数条边的路径中位数之和.树形生成方式为随机取不连通两点连边直到全 ...

  4. 科普IIS是什么?IIS介绍!

    1.Microsoft IIS 是允许在公共Intranet或Internet上发布信息的Web服务器.Internet Information Server通过运用超文本传输协议(HTTP)传输信息 ...

  5. 关于maven依赖中的scope的作用和用法

    举例如下: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>s ...

  6. VUE项目二级菜单刷新时404 nginx

    原因:vue项目的路径时虚拟路径,并不存在,所以用nginx去请求请求不到,所以vue项目做了两部调整: 1.所有的请求后端接口地址前端写死 2.nginx里把所有的接口转发后端删掉,并添加以下内容 ...

  7. 攻防世界Web_shrine

    题目: 给的是源代码,整理一下如下: 看到jinjia flask,render_template_string猜测到这题应该是考查python模板注入. 代码分析可以得到以下信息: 1.路径在 /s ...

  8. [旧][Android] ButterKnife 浅析

    备注 原发表于2016.05.08,资料已过时,仅作备份,谨慎参考 前言 自上星期写 Retrofit 写吐之后 ... 我问大队长能不能换个其他什么东西写,大队长就说了个单词 ButterKnife ...

  9. Internet/Custom路由配置——网络测试仪实操

    一.测试说明以及功能原理 本文主要介绍Internet/Custom路由配置方法以及实验: ◆作用:可以通过此功能模拟注入不同百分比掩码的路由 ◆特点:只针对路由协议(目前RIP协议不支持,因为RIP ...

  10. 一文告诉你dashboard究竟有多重要!

    dashboard,我们一看这个词可能会觉得困惑,这是什么意思?看起来很高大上的样子. 实际上它的中文含义即是我们BI界老生常谈的话题--仪表盘.dashboard是商业智能仪表盘的简称,它是一般商业 ...