Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

CentOS 英文版安裝中文支援套件

編輯:Linux 教學

問題背景

安裝 CentOS 5/6 時選擇英文語系,導致 FTP 中文檔名亂碼、網頁瀏覽中文網站顯示方塊字。

解決方法:安裝中文字體套件

從安裝光碟或 YUM 源安裝以下兩個關鍵 RPM:

fonts-chinese-3.02-9.6.el5.noarch.rpm
fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm

YUM 一鍵安裝(推薦)

yum install fonts-chinese
# 或安裝字體群組
yum groupinstall "Chinese Support"

驗證

  • 重新登入圖形介面或重啟 X Server
  • 瀏覽中文網頁、檢視中文檔名應正常顯示
  • 終端執行 fc-list :lang=zh 列出可用中文字體

補充:Locale 設定

僅安裝字體不足夠,仍需確保系統 locale 支援中文:

# /etc/sysconfig/i18n
LANG="zh_CN.UTF-8"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="latarcyrheb-sun16"

修改後重啟或重新登入生效。

Copyright © Windows教程網 All Rights Reserved