上传安装包/opt/ztfonts
mkdir /opt/ztfonts
cd /opt/ztfonts
mkdir -p /usr/share/fonts/chinese
#上传字体,按实际需要来
chmod -R 755 /usr/share/fonts/chinese
rpm包方式安装
cd /opt/ztfonts
yum -y localinstall *.rpm
配置本地yum源安装,用yum直接安装
yum install -y fontconfig ttmkfdir
ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
vim /etc/fonts/fonts.conf
:set nu #显示行号
#在第27行<dir prefix="xdg">fonts</dir>之上添加
<dir>/usr/share/fonts/chinese</dir>
fc-cache
fc-list | grep /usr/share/fonts/chinese