zabbix之修改中文
#在zabbix服务器安装中文名包 root@ubuntu:~# sudo apt-get install language-pack-zh* #:修改环境变量 root@ubuntu:~# sudo vim /etc/environment PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" LANG="zh_CN.UTF-8" LANGUAGE="zh_CN:zh:en_US:en" #:重新设置本地配置 sudo dpkg-reconfigure locales [*] zh_CN.UTF-8 UTF-8 zh_CN.UTF-8
#:重启Apache
root@ubuntu:~# systemctl restart apache2
在页面设置
修改乱码
#:在控制面板找到字体,我用的楷体,将字体复制到桌面,然后传到zabbix服务器,将文件拷贝到此目录 root@ubuntu:/usr/share/zabbix/fonts# cd /usr/share/zabbix/assets/fonts
root@ubuntu:/usr/share/zabbix/assets/fonts# ll
total 11520
drwxr-xr-x 2 root root 4096 Sep 20 14:50 ./
drwxr-xr-x 5 root root 4096 Sep 20 13:03 ../
lrwxrwxrwx 1 root root 38 Sep 20 13:03 graphfont.ttf -> /etc/alternatives/zabbix-frontend-font
-rw-r--r-- 1 root root 11785184 Sep 20 14:50 simkai.ttf
#修改配置 root@ubuntu:/usr/share/zabbix/include# cd /usr/share/zabbix/include root@ubuntu:/usr/share/zabbix/include# vim defines.inc.php define('ZBX_GRAPH_FONT_NAME', 'simkai'); // font file name define('ZBX_FONT_NAME', 'simkai');(第111行)
刷新页面就可以le