Linuxのzabbix4.0中文亂碼處理


 

在本地電腦路徑下C:\Windows\Fonts,找到楷體(simkai.ttf)文件后,上傳到zabbix服務器(/usr/share/zabbix/fonts),並對文件授予執行權限

[root@bigdata ~]# cd /usr/share/zabbix/fonts/
[root@bigdata fonts]# ll
total 11512
lrwxrwxrwx 1 root root       33 Mar  1 03:59 graphfont.ttf -> /etc/alternatives/zabbix-web-font
-rw-r--r-- 1 root root 11787328 Mar  4 02:33 simkai.ttf
[root@bigdata fonts]# chmod a+x simkai.ttf 
[root@bigdata fonts]# ll
total 11512
lrwxrwxrwx 1 root root       33 Mar  1 03:59 graphfont.ttf -> /etc/alternatives/zabbix-web-font
-rwxr-xr-x 1 root root 11787328 Mar  4 02:33 simkai.ttf

 

切換到zabbix的web端顯示界面的軟鏈接路徑下

[root@bigdata fonts]# cd /etc/alternatives/
[root@bigdata alternatives]# ll
total 0
lrwxrwxrwx 1 root root 35 Oct 22  2016 java -> /usr/lib/jvm/jre-1.5.0-gcj/bin/java
lrwxrwxrwx 1 root root 32 Oct 22  2016 jaxp_parser_impl -> /usr/share/java/libgcj-4.4.7.jar
lrwxrwxrwx 1 root root 26 Oct 22  2016 jre -> /usr/lib/jvm/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 26 Oct 22  2016 jre_1.5.0 -> /usr/lib/jvm/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 34 Oct 22  2016 jre_1.5.0_exports -> /usr/lib/jvm-exports/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 34 Oct 22  2016 jre_exports -> /usr/lib/jvm-exports/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 26 Oct 22  2016 jre_gcj -> /usr/lib/jvm/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 34 Oct 22  2016 jre_gcj_exports -> /usr/lib/jvm-exports/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 38 Oct 22  2016 keytool -> /usr/lib/jvm/jre-1.5.0-gcj/bin/keytool
lrwxrwxrwx 1 root root 10 Oct 22  2016 ksh -> /bin/ksh93
lrwxrwxrwx 1 root root 30 Oct 22  2016 ksh-man -> /usr/share/man/man1/ksh93.1.gz
lrwxrwxrwx 1 root root 42 Oct 22  2016 rmiregistry -> /usr/lib/jvm/jre-1.5.0-gcj/bin/rmiregistry
lrwxrwxrwx 1 root root 29 Mar  1 04:00 zabbix-server -> /usr/sbin/zabbix_server_mysql
lrwxrwxrwx 1 root root 38 Mar  1 03:59 zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf # zabbix-web端默認文字顯示格式軟鏈接
 

 

清除該軟連接,並新建軟連接制定到我們剛剛從所上傳的楷體(simkai.ttf)文件

[root@bigdata alternatives]# rm -rf zabbix-web-font 
[root@bigdata alternatives]# ll
total 0
lrwxrwxrwx 1 root root 35 Oct 22  2016 java -> /usr/lib/jvm/jre-1.5.0-gcj/bin/java
lrwxrwxrwx 1 root root 32 Oct 22  2016 jaxp_parser_impl -> /usr/share/java/libgcj-4.4.7.jar
lrwxrwxrwx 1 root root 26 Oct 22  2016 jre -> /usr/lib/jvm/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 26 Oct 22  2016 jre_1.5.0 -> /usr/lib/jvm/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 34 Oct 22  2016 jre_1.5.0_exports -> /usr/lib/jvm-exports/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 34 Oct 22  2016 jre_exports -> /usr/lib/jvm-exports/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 26 Oct 22  2016 jre_gcj -> /usr/lib/jvm/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 34 Oct 22  2016 jre_gcj_exports -> /usr/lib/jvm-exports/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 38 Oct 22  2016 keytool -> /usr/lib/jvm/jre-1.5.0-gcj/bin/keytool
lrwxrwxrwx 1 root root 10 Oct 22  2016 ksh -> /bin/ksh93
lrwxrwxrwx 1 root root 30 Oct 22  2016 ksh-man -> /usr/share/man/man1/ksh93.1.gz
lrwxrwxrwx 1 root root 42 Oct 22  2016 rmiregistry -> /usr/lib/jvm/jre-1.5.0-gcj/bin/rmiregistry
lrwxrwxrwx 1 root root 29 Mar  1 04:00 zabbix-server -> /usr/sbin/zabbix_server_mysql
[root@bigdata alternatives]# ln -s /usr/share/zabbix/fonts/simkai.ttf /etc/alternatives/zabbix-web-font
[root@bigdata alternatives]# ll
total 0
lrwxrwxrwx 1 root root 35 Oct 22  2016 java -> /usr/lib/jvm/jre-1.5.0-gcj/bin/java
lrwxrwxrwx 1 root root 32 Oct 22  2016 jaxp_parser_impl -> /usr/share/java/libgcj-4.4.7.jar
lrwxrwxrwx 1 root root 26 Oct 22  2016 jre -> /usr/lib/jvm/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 26 Oct 22  2016 jre_1.5.0 -> /usr/lib/jvm/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 34 Oct 22  2016 jre_1.5.0_exports -> /usr/lib/jvm-exports/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 34 Oct 22  2016 jre_exports -> /usr/lib/jvm-exports/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 26 Oct 22  2016 jre_gcj -> /usr/lib/jvm/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 34 Oct 22  2016 jre_gcj_exports -> /usr/lib/jvm-exports/jre-1.5.0-gcj
lrwxrwxrwx 1 root root 38 Oct 22  2016 keytool -> /usr/lib/jvm/jre-1.5.0-gcj/bin/keytool
lrwxrwxrwx 1 root root 10 Oct 22  2016 ksh -> /bin/ksh93
lrwxrwxrwx 1 root root 30 Oct 22  2016 ksh-man -> /usr/share/man/man1/ksh93.1.gz
lrwxrwxrwx 1 root root 42 Oct 22  2016 rmiregistry -> /usr/lib/jvm/jre-1.5.0-gcj/bin/rmiregistry
lrwxrwxrwx 1 root root 29 Mar  1 04:00 zabbix-server -> /usr/sbin/zabbix_server_mysql
lrwxrwxrwx 1 root root 34 Mar  4 02:36 zabbix-web-font -> /usr/share/zabbix/fonts/simkai.ttf
[root@bigdata alternatives]# 

 

替換完成后,重新刷新網頁即可

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM