其他分享
首页 > 其他分享> > Zabbix Scheduled reports中文乱码

Zabbix Scheduled reports中文乱码

作者:互联网

困扰了一天的问题,最后还是靠百度大神的方法解决。原文链接 https://blog.csdn.net/weixin_38587368/article/details/119357516

 

由于我的是容器环境,稍微有点不同。

 

一、允许yum东西

docker exec -u root -it zabbix-server sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
docker exec -u root -it zabbix-server sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
docker exec -u root -it zabbix-web-service sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
docker exec -u root -it zabbix-web-service sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

二、yum安装软件

docker exec -u root -it zabbix-server yum install langpacks-zh_CN.noarch fontconfig ttmkfdir -y
docker exec -u root -it zabbix-web-service yum install langpacks-zh_CN.noarch fontconfig ttmkfdir -y

三、创建字体文件夹

docker exec -u root -it zabbix-server mkdir /usr/share/fonts/chinese -p
docker exec -u root -it zabbix-server chmod -R 755 /usr/share/fonts/chinese
docker exec -u root -it zabbix-web-service mkdir /usr/share/fonts/chinese -p
docker exec -u root -it zabbix-web-service chmod -R 755 /usr/share/fonts/chinese

四、复制字体到容器内部

cd /www/zabbix
docker cp MSYH.TTF zabbix-server:/usr/share/fonts/chinese/
docker cp MSYH.TTF zabbix-web-service:/usr/share/fonts/chinese/

五、更新字体缓存

docker exec -u root -it zabbix-server ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
docker exec -u root -it zabbix-server fc-cache
docker exec -u root -it zabbix-server fc-list
docker exec -u root -it zabbix-web-service ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
docker exec -u root -it zabbix-web-service fc-cache
docker exec -u root -it zabbix-web-service fc-list

六、重启容器

docker restart zabbix-server
docker restart zabbix-web-service

标签:Scheduled,web,exec,zabbix,server,乱码,Zabbix,docker,root
来源: https://www.cnblogs.com/guoyabin/p/16449206.html