安装fontconfig来安装字体库
yum install mkfontscale
yum install fontconfig
mkfontscale
mkfontdir
将widows系统中的 字体文件上传至 /usr/shared/fonts/chinese 中
cd /usr/shared/fonts/chinese
chmod -R 755 /usr/share/fonts/chinese
yum -y install ttmkfdir
vi /etc/fonts/fonts.conf
添加 <dir>/usr/share/fonts/chinese</dir>
<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
<dir>/usr/share/fonts/chinese</dir> <!--此处添加-->
<dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/TTF</dir> <dir>/usr/local/share/fonts</dir>
<dir prefix="xdg">fonts</dir>
<dir>/usr/share/fonts/chinese<dir>
<!-- the following element will be removed in the future -->
<dir>~/.fonts</dir>
fc-cache刷新
fc-cache -f -v
source /etc/profile
此时,使用fc-list:ang=zh
即可看到安装的中文字体。