centos7安装中文字体

xiaoxiao2021-02-28  88

centos7买来以后一般都是空白的,很多东西需要安装不废话,直接来安装:

1、先把windows下的字体文件拷贝到usr/share/fonts/win文件夹下面,然后用命令:

修改字体全新:

修改字体文件的权限,使root用户以外的用户也可以使用chmod 755 *

[root@iZ250234rf8Z TrueType]# mkfontscale [root@iZ250234rf8Z TrueType]# mkfontdir [root@iZ250234rf8Z TrueType]# fc-cache -fv 如果找不到命令mkfontscale则要安装,yum install mkfontscale (fc命令也是一样的执行: yum install fontconfig ) 如果安装时出现Could not resolve host: mirrors.cloud.aliyuncs.com; Name or service not known" Trying other mirror.,出现类似的错误,则很有可能是dns解析的问题:可以在vi /etc/resolv.conf配置两个dns: nameserver 8.8.8.8 ##google域名 服务器nameserver 8.8.4.4 ##谷歌域名服务器 然后service network restart 重启 继续安装命令安装完:查看字体fc-list查看所有字体 重启机器,如果不生效最好也重启下应用reboot;

如果还不行再执行以下内容:

#yum groupinstall chinese-support console终端也必须设置为utf8编码 1、console终端乱码 在/etc/profile文件的最后一行添加如下内容: export LC_ALL="zh_CN.utf8"

转载请注明原文地址: https://www.6miu.com/read-51336.html

最新回复(0)