Zabbix監控頁面中文顯示異常,具體爲顯示爲方塊,如圖所示。php
首先查找zabbix安裝目錄,找到字體具體位置。web
#查找zabbix安裝位置 [root@promote ~]# whereis zabbix zabbix: /usr/lib/zabbix /etc/zabbix /usr/share/zabbix [root@promote ~]# ls /usr/share/zabbix/ actionconf.php app charts.php hostinventories.php items.php report2.php styles adm.gui.php applications.php conf host_prototypes.php js report4.php sysmap.php adm.housekeeper.php audio conf.import.php host_screen.php jsLoader.php robots.txt sysmaps.php adm.iconmapping.php auditacts.php correlation.php hosts.php jsrpc.php screenconf.php templates.php adm.images.php auditlogs.php discoveryconf.php httpconf.php latest.php screenedit.php toptriggers.php adm.macros.php browserwarning.php disc_prototypes.php httpdetails.php local screen.import.php tr_events.php adm.other.php chart2.php favicon.ico image.php locale screens.php trigger_prototypes.php adm.regexps.php chart3.php fonts images maintenance.php search.php triggers.php adm.triggerdisplayoptions.php chart4.php graphs.php img map.import.php services.php usergrps.php adm.triggerseverities.php chart5.php history.php imgstore.php map.php setup.php users.php adm.valuemapping.php chart6.php host_discovery.php include overview.php slideconf.php zabbix.php adm.workingtime.php chart7.php hostgroups.php index_http.php profile.php slides.php api_jsonrpc.php chart.php hostinventoriesoverview.php index.php queue.php srv_status.php #字體文件位置 [root@promote ~]# ls /usr/share/zabbix/fonts/ graphfont.ttf [root@promote ~]# cd /usr/share/zabbix/fonts/ [root@promote fonts]# pwd /usr/share/zabbix/fonts [root@promote fonts]# ls -l 總用量 0 lrwxrwxrwx. 1 root root 33 3月 25 15:24 graphfont.ttf -> /etc/alternatives/zabbix-web-font [root@promote fonts]#
採用winscp等工具將Windows中文字體上傳到 /usr/share/zabbix/fonts/ 文件夾。本文中文字體爲宋體。字體權限修改後截圖以下所示:json
切換至/etc/alternatives 目錄查看軟連接。api
刪除舊軟連接並新建。也能夠修改成其餘中文字體,例如仿宋或者微軟雅黑。瀏覽器
#刪除舊軟連接 [root@promote fonts]# rm -f /etc/alternatives/zabbix-web-font #新建軟連接 [root@promote fonts]# ln -s /usr/share/zabbix/fonts/simsun.ttc /etc/alternatives/zabbix-web-font
刷新(Ctrl+F5)瀏覽器頁面便可,若是顯示異常,請從新啓動zabbix-server服務。app
[root@promote fonts]# systemctl restart zabbix-server
正常顯示字體如圖所示。ide