当前位置: > CentOS > CentOS入门 >

centos7安装中文字体

时间:2017-05-09 13:19来源:linux.it.net.cn 作者:IT

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

 

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

修改字体全新:


 
  1. 修改字体文件的权限,使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;

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

 


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

(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容