centos7安装中文字体,centos7中文字体


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

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

修改字体全新:

[csharp]view plaincopy

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

[root@iZ250234rf8ZTrueType]#mkfontscale

[root@iZ250234rf8ZTrueType]#mkfontdir

[root@iZ250234rf8ZTrueType]#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;

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

[csharp]view plaincopy

#yumgroupinstallchinese-support

console终端也必须设置为utf8编码

1、console终端乱码

在/etc/profile文件的最后一行添加如下内容:

exportLC_ALL="zh_CN.utf8"


相关内容

    暂无相关文章