当前位置: 首页 > news >正文

用window字体替换zabbix 默认的字体

我们先需要在windows系统下的C:\Windows\Fonts目录,找到一个喜欢的字体,我选择的是微软雅黑。复制到其它路径下,选取一个msyh.ttc。到服务器上。要把msyh.ttc改为msyh.ttf才可以。不然最后中英文都不显示


[root@hadoop105.yinzhengjie.com ~]# find / -name defines.inc.php
/usr/share/zabbix/include/defines.inc.php
[root@hadoop105.yinzhengjie.com ~]# 
[root@hadoop105.yinzhengjie.com ~]# grep -i graphfont /usr/share/zabbix/include/defines.inc.php
define('ZBX_GRAPH_FONT_NAME',        'graphfont'); // font file name
define('ZBX_FONT_NAME', 'graphfont');
[root@hadoop105.yinzhengjie.com ~]# 
[root@hadoop105.yinzhengjie.com ~]# find /usr/share/zabbix/ -name graphfont*  # 我们可以先查看一下字体文件在哪个路径,而后看看是否还有其它字体。
/usr/share/zabbix/assets/fonts/graphfont.ttf
[root@hadoop105.yinzhengjie.com ~]# 
[root@hadoop105.yinzhengjie.com ~]# ll /usr/share/zabbix/assets/fonts
total 0
lrwxrwxrwx 1 root root 33 Nov  4 16:24 graphfont.ttf -> /etc/alternatives/zabbix-web-font
[root@hadoop105.yinzhengjie.com ~]# 
[root@hadoop105.yinzhengjie.com ~]# ll
total 11512
-rw-r--r-- 1 root root 11787328 Mar  2  2019 simkai.ttf
[root@hadoop105.yinzhengjie.com ~]# 
[root@hadoop105.yinzhengjie.com ~]# mv simkai.ttf /usr/share/zabbix/assets/fonts
[root@hadoop105.yinzhengjie.com ~]# 
[root@hadoop105.yinzhengjie.com ~]# ll /usr/share/zabbix/assets/fonts  # 注意观察,字体的名称后缀是否一致,若不一致则不要继续做后面的操作,否则可能会导致zabbix web界面的英文文字也不正常显示了。
total 11512
lrwxrwxrwx 1 root root       33 Nov  4 16:24 graphfont.ttf -> /etc/alternatives/zabbix-web-font
-rw-r--r-- 1 root root 11787328 Mar  2  2019 simkai.ttf
[root@hadoop105.yinzhengjie.com ~]# 
[root@hadoop105.yinzhengjie.com ~]# cp /usr/share/zabbix/include/defines.inc.php /usr/share/zabbix/include/defines.inc.php-`date +%F`  # 修改前一定要做好被备份哟~
[root@hadoop105.yinzhengjie.com ~]# 
[root@hadoop105.yinzhengjie.com ~]# sed -r -i 's#graphfont#simkai#' /usr/share/zabbix/include/defines.inc.php  # 修改字体为我们刚刚上传的windows字体即可~
[root@hadoop105.yinzhengjie.com ~]# 
[root@hadoop105.yinzhengjie.com ~]# grep -i simkai /usr/share/zabbix/include/defines.inc.php
define('ZBX_GRAPH_FONT_NAME',        'simkai'); // font file name
define('ZBX_FONT_NAME', 'simkai');
[root@hadoop105.yinzhengjie.com ~]# 
[root@hadoop105.yinzhengjie.com ~]#
http://www.lryc.cn/news/595284.html

相关文章:

  • 招聘公务员问题
  • ISPDiffuser文章翻译理解
  • 数据库占用内存过高?
  • Windows防火墙配置详解
  • 设备虚拟化与动态路由核心技术
  • AJAX 概念与 axios 使用
  • visual studio安装错误
  • Grok网站的后端语言是php和Python2.7
  • Linux——自制shell命令行解释器
  • Linux的系统调用机制总结
  • linux定时器使用
  • 如何优化Java的原生反射Method.invoke()
  • Linux--初识linux
  • c++找工作(qt)
  • (二)Unity3d-ROS联合仿真:运行Unity-Robotics-Hub
  • 【Linux庖丁解牛】— 线程控制!
  • 教育数字化革命:低代码破局与未来展望
  • 今日行情明日机会——20250721
  • (一)ZooKeeper 发展历史
  • 计算机发展史:人工智能时代的智能变革与无限可能
  • CLIP与SIGLIP对比浅析
  • oracle 数据库中,将几张表的数据按指定日期范围实时同步至同一个数据库的备份表中。
  • 详解 F.cross_entropy 与标签平滑的工作原理
  • Day07_网络编程20250721(网络编程考试试卷)
  • 比特币技术简史 第五章:交易机制 - UTXO模型、脚本系统与多重签名
  • PyCharm 未正确关联 .jpg 为图片格式
  • 玩转Rocky Linux 9 部署Redis指南
  • Jmeter如何做接口测试?
  • 前端之学习后端java小白(一)之SDKMAN
  • JavaScript的引入方式和基础语法的快速入门与学习