Linux centos 5 x 中文字型解決方案

2021-06-28 13:38:53 字數 1189 閱讀 1686

在linux下新增支援中文字型,中文字型的獲取可以從windows平台的字型庫中找到,windows下的c:\windows\fonts下面有你想要的字型,比如simsun.ttc《簡體中文》等字型。

centos下的字型庫存放位置:/usr/share/fonts

具體操作步驟:

******************************==

1. 在/usr/share/fonts/chinese資料夾下建立乙個資料夾(windows)

[root@localhost ~]# mkdir /usr/share/fonts/chinese/windows

2. 把從windows中找出的字型複製到windows資料夾中,再為windows資料夾更改許可權

[root@localhost ~]# chmod -r 755 /usr/share/fonts/chinese/windows

3. 在字型目錄中執行ttmkfdir命令

[root@localhostwindows]# ttmkfdir -e /usr/share/x11/fonts/encodings/encodings.dir

4. 更改fonts.conf檔案

[root@localhost ~]#

vi /etc/fonts/fonts.conf

然後新增如下一行;

/usr/share/fonts/chinese/windows

新增位置如下:

/usr/share/fonts/chinese/windows

#新加內容

/usr/share/fonts

5. 重啟xfs伺服器

[root@localhost ~]# service xfs restart

6. 檢視字型有沒有新增成功

[root@localhost ~]# fc-list :lang=zh-cn

新宋體,nsimsun:style=regular

宋體,simsun:style=regular #字型新增成功

文鼎pl中楷uni,ar pl zenkai uni:style=medium

文鼎pl細上海宋uni,ar pl shanheisun uni,文鼎pl細上海宋uni:style=regular

至此,在linux新增支援中文字型成功

Linux CentOS7 X 新增使用者

1 建立使用者 useradd username 其中,username是要建立使用者的使用者名稱 root使用 2 設定密碼 passwd username 其中,username是指定要修改密碼的使用者名稱 root使用 3 使用者授權 建立賬戶必須授權,不然,個人使用者的許可權只可以在本hom...

修改Linux CentOS語言為中文

1 locale a grep zh cn 列出所有可用的公共語言環境的名稱,然後篩選中文 如果顯示下面部分,則表示有中文安裝包 zh cn zh cn.gb18030 zh cn.gb2312 zh cn.gbk zh cn.utf8 如果不顯示上面部分,則需要安裝中文包 yum install ...

Linux Centos 5 使用者管理

linux系統中存在三種使用者 root使用者 系統使用者 普通使用者。id號 1 root使用者的id是0 2 預設的系統使用者uid範圍 1 499 3 普通使用者的uid範圍 系統預設從500開始編號 使用者管理相關檔案 使用者的預設配置資訊在 etc login.defs中 需要與其他命令結...