一、配置yum源
目录:cd /etc/yum.repos.d/mylocalrepo.repo
[mylocalrepo]
name=My Local Repository
baseurl=file:///media/myrepo
enabled=1
gpgcheck=0
清除yum缓存
yum clean all
查看yum源
yum repolist
二、查看系统字体
yum install -y fontconfig mkfontscale
fc-list
fc-list :lang=zh
三、cp需要的字体,例如MSYH.TTF(微软雅黑字体文件)文件上传到linux服务器上。
cp MSYH.TTF /usr/share/fonts/
四、然后建立字体索引信息,更新字体缓存,使用如下命令:
cd /usr/share/fonts/
mkfontscale
mkfontdir
fc-cache
fc-list :lang=zh