A機器 [root@hf-01 ~]# vim /usr/share/zabbix/include/defines.inc.php 搜索 /ZBX_FONTPATH 會看到字體所在的相對路徑 define('ZBX_FONTPATH', realpath('fonts')); // where to search for font (GD > 2.0.18) define('ZBX_GRAPH_FONT_NAME', 'graphfont'); // font file name 裏面的 realpath('fonts')); //這個爲zabbix字庫所在的路徑,使用的路勁是相對路徑,相對於/usr/share/zabbix/ 'graphfont'); // font file name // 這個爲字體的名字
-它定義的路徑是「fonts」,它是一個相對路徑,絕對路徑爲/usr/share/zabbix/fonts,而字體文件爲「ZBX_GRAPH_FONT_NAME」所定義的「graphfont」,它是一個文件,絕對路徑爲/usr/share/zabbix/fonts/graphfont 7. 這個目錄下的/usr/share/zabbix/fonts/graphfont.ttf文件軟連接到了/etc/alternatives/zabbix-web-font文件,而/etc/alternatives/zabbix-web-font文件又軟連接到了 /usr/share/fonts/dejavu/DejaVuSans.ttfphp
[root@hf-01 ~]# ls /usr/share/zabbix/fonts/ graphfont.ttf [root@hf-01 ~]# ls -l !$ ls -l /usr/share/zabbix/fonts/ 總用量 0 lrwxrwxrwx 1 root root 33 1月 3 01:51 graphfont.ttf -> /etc/alternatives/zabbix-web-font [root@hf-01 ~]# ls -l /etc/alternatives/zabbix-web-font lrwxrwxrwx 1 root root 38 1月 3 01:51 /etc/alternatives/zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf [root@hf-01 ~]#
[root@hf-01 ~]# cd /usr/share/zabbix/fonts/ [root@hf-01 fonts]# ls graphfont.ttf SIMFANG.TTF [root@hf-01 fonts]#
[root@hf-01 fonts]# mv graphfont.ttf graphfont.ttf.back [root@hf-01 fonts]#
[root@hf-01 fonts]# ln -s SIMFANG.TTF graphfont.ttf [root@hf-01 fonts]# ls -l 總用量 10332 lrwxrwxrwx 1 root root 11 2月 2 06:45 graphfont.ttf -> SIMFANG.TTF lrwxrwxrwx 1 root root 33 1月 3 01:51 graphfont.ttf.back -> /etc/alternatives/zabbix-web-font -rw-r--r-- 1 root root 10576012 6月 11 2009 SIMFANG.TTF [root@hf-01 fonts]#