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. JUC并发工具类之 CyclicBarrier同步屏障

    首先看看CyclicBarrier的使用场景: 10个工程师一起来公司应聘,招聘方式分为笔试和面试.首先,要等人到齐后,开始笔试:笔试结束之后,再一起参加面试.把10个人看作10个线程,10个线程之间 ...

  2. docker安装、基本使用、实战(测试必备)

    Docker概念.作用.术语 一张超级形象的图 看到这张图,大家会想到什么? 可以这么理解:大海是操作系统,鲸鱼是Docker,集装箱是在Docker 运行的容器! 概念 百度百科:Docker 是一 ...

  3. 日常问题记录 E138: Can't write viminfo file /root/.viminfo!

    问题是因为磁盘不足导致 看磁盘占用情况 排查:du --max-depth=1 -h   这个命令可以查看当前目录下哪个目录占用最大,然后再进一步看

  4. smbms项目核心功能实现

    SMBMS 数据库: 项目如何搭建? 考虑使用不使用Maven?依赖,Jar 1.项目搭建准备工作 搭建一个maven web项目 配置Tomcat 测试项目是否能够跑起来 导入项目中会遇到的jar包 ...

  5. C#TaskScheduler 任务调度器的原理

    什么是TaskScheduler? SynchronizationContext是对"调度程序(scheduler)"的通用抽象.个别框架会有自己的抽象调度程序,比如System. ...

  6. C#特性(属性)Attribute

    先明确一个概念: 元数据..NET中元数据是指程序集中的命名空间.类.方法.属性等信息.这些信息是可以通过Reflection读取出来的. 再来看个例子: #define BUG //#define ...

  7. 用RecyclerView实现根据位置不同显示不同界面

    在原来的基础上将LinearAdapter.java进行修改: 1 public class LinearAdapter extends RecyclerView.Adapter<Recycle ...

  8. 分布式 PostgreSQL - Citus 架构及概念

    节点 Citus 是一种 PostgreSQL 扩展,它允许数据库服务器(称为节点)在"无共享(shared nothing)"架构中相互协调.这些节点形成一个集群,允许 Post ...

  9. python os.system 和popen

    1.python  os.system 和popen  其中第一个只会返回0或者1,另外一个会返回执行结果 每天生成一个文件,并把磁盘的使用情况写到到这个文件中,文件名为日期格式(yyyy-mm-dd ...

  10. C# Winform中FpSpread表格控件设置固定的(冻结的)行或列

    在项目中我们经常会用到固定表头的操作,FpSpread提供了冻结行或列的属性. 你可以冻结表单中的行或列(使其不可滚动). 你可以冻结任意个表单顶部的行,使其成为前导行,你也可以冻结左侧任意多个列,使 ...