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

相关推荐
LuL_Vegetable4 小时前
写一个Linux服务器自动tcpdum抓包脚本
linux·wireshark·bash·tcpdump
CDN3604 小时前
中小站安全方案|360高防服务器+CDN搭配使用,防护效果翻倍
运维·服务器·安全
草莓熊Lotso4 小时前
Linux 进程间通信之命名管道(FIFO):跨进程通信的实用方案
android·java·linux·运维·服务器·数据库·c++
草莓熊Lotso4 小时前
MySQL 表约束核心指南:从基础约束到外键关联(含实战案例)
android·运维·服务器·数据库·c++·人工智能·mysql
chenzhuyu4 小时前
海康NAS R1新版下载引擎
运维·服务器·nas
安逸sgr4 小时前
MCP 协议深度解析(一):MCP 协议概览与架构设计
服务器·网络·人工智能·网络协议·agent·mcp
淮北4944 小时前
ubuntu下好用的工具
linux·运维·ubuntu
..过云雨4 小时前
【负载均衡oj项目】03. compile_server编译运行服务设计
运维·c++·html·负载均衡
kaico20184 小时前
jenkins的安装—windows环境
运维·jenkins
cg_ssh4 小时前
MinIO docker 集群
运维·docker·容器