centos6和centos7无网络环境下安装fontconfig,配置中文字体

以centos6为例

1、查看系统版本

cat /etc/redhat-release

2、访问https://vault.centos.org下载相关rpm包

找到对应系统版本

3、下载相应的rpm包上传到服务器

dejavu-fonts-common-2.33-1.el6.noarch.rpm

dejavu-sans-fonts-2.33-1.el6.noarch.rpm

fontconfig-2.8.0-5.el6.x86_64.rpm

fontpackages-filesystem-1.41-1.1.el6.noarch.rpm

freetype-2.3.11-17.el6.x86_64.rpm

4、进入rpm包文件夹

rpm -Uvh --force --nodeps *.rpm

5、查看linux已安装中文字体

fc-list :lang=zh

6、上传字体

mkdir -p /usr/share/fonts/my_fonts

将要安装的字体上传到该文件夹下

进入C:\Windows\Fonts,该文件夹下就存放相关字体

7、添加字体文件

vim /etc/fonts/fonts.conf

<!-- Font directory list -->

<dir>/usr/share/fonts</dir>

<dir>/usr/share/fonts/my_fonts</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>

<!-- the following element will be removed in the future →

8、刷新内存中的字体缓存

fc-cache

5、查看字体列表fc-list

fc-list :lang=zh

相关推荐
likfishdn2 分钟前
Linux的文件与目录管理
linux·运维·服务器
渲染101专业云渲染3 分钟前
川翔云电脑优势总结
服务器·3d·电脑·blender·maya
chian-ocean21 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
加油=^_^=23 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
橘子味的茶二32 分钟前
高级系统架构师--第十章:计算机网络
服务器·计算机网络·系统架构
吃汤圆的抹香鲸1 小时前
GoLand 安装包 绿色版 Win,Mac,Linux 包含IntelliJ全家桶 专为Go语言设计的集成开发环境(IDE)
linux·windows·macos·go·intellij-idea·go1.19
紫菜(Nori)1 小时前
短连接服务器压测-wrk
服务器·压力测试
追寻光1 小时前
Cannot find a valid baseurl for repo: base/7/x86_64
linux
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
陆沙1 小时前
deepseek-r1-centos-本地服务器配置方法
linux·服务器·centos