centos7安装中文字体

来源:互联网 发布:幼儿美工环境创设方案 编辑:程序博客网 时间:2024/05/16 17:31

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-supportconsole终端也必须设置为utf8编码1、console终端乱码在/etc/profile文件的最后一行添加如下内容:export LC_ALL="zh_CN.utf8"


0 0
原创粉丝点击