Linux服务器用yum安装中文包 (实际案例详细记录)

背景:报表升级后,R135版本报表的图中汉字无法正常显示。

解决方案:用yum重新安装中文包。

环境限制:无Internet链接,纯内网。报表服务器上面的OS为 RHEL 5.4。

必备的材料:RHEL_5.4的安装镜像。

过程描述:

重新安装报表服务器的中文包,配置yum源,用yum安装一下中文安装包。详细的配置过程如下:

(1)用Xftp将 D:\MySoftware\linux\linux5.4_32  目录下的 RHEL_5.4 i386 DV.iso  镜像 上传到报表服务器 /opt 目录下。

(2)进入 /mnt 目录,创建挂载点。

cd /mnt

mkdir rhel

(3)挂载镜像

mount -o loop /opt/RHEL_5.4 i386DV.iso  /mnt/rhel/

挂载完后,先退出rhel,之后再进去这个目录,用 ls 查看。 里面能看到很多安装包文件。

(4)进入 /etc/yum.repos.d/ 目录,  创建 yum.repo 文件

cd /etc/yum.repos.d/

vim yum.repo 

yum.repo文件中添加以下内容:

[rhel5u4]

name=rhel5u4

baseurl=file:///mnt/rhel/Server

enabled=1

gpgcheck=0

保存退出。

(5) 执行   yum clean all  命令

(6)执行   yum list 命令查看

(7)执行   yum groupinstall chinese-support -y命令。安装完成后,重启 报表服务器, 图表中的汉字可以正常显示了。

ps: 安装单个 安装包 可以用  yuminstall fonts-chinese.noarch -y

-------------------------------以下为在网上找到的yum命令----------------------------------------

yum list 
yum list installed
yum list available
yum search apache
yum install httpd//安装
yum remove httpd   //卸载
yum update yum//先删除老版本的yum,在安装新版本的yum

yum history  //查看yum的所有操作

-------------------------------以下为在RHEL 6.5联网环境下的yum group命令----------------------------------------

Why use yum groups? 
(1)Simplify installation of related packages
(2)One command installs many related packages
Prerequisite: (1) Administrator (root) access (2)Internet access
yum grouplist : to view available package groups
yum grouplist  | grep web : use a grep filter to look for specific groups
yum groupinstall"Web Server" : to install a group of packages
yum groupremove -y "Web Server" : to remove the newly installed group of packages


-------------------------------以下为在Fedora环境下的yum语言支持命令----------------------------------------

To install any language support in your Fedora Desktop you need to use following command

yum groupinstall -support
yum langinstall 

e.g. to install simplified-chinese-support language support use

yum groupinstall simplified-chinese-support
yum langinstall zh_CN

To remove any language support in your Fedora Desktop you need to use following command

yum groupremove -support
yum langremove 

e.g. to remove Hindi language support use

yum groupremove hindi-support
yum langremove hi_IN

Yum Language Support

Country yum language group locale code
Afrikaans(SouthAfrica)   af_ZA
Albanian   sq_AL
Arabic(Algeria) arabic-support ar_DZ
Arabic(Bahrain) arabic-support ar_BH
Arabic(Egypt) arabic-support ar_EG
Arabic(India) arabic-support ar_IN
Arabic(Iraq) arabic-support ar_IQ
Arabic(Jordan) arabic-support ar_JO
Arabic(Kuwait) arabic-support ar_KW
Arabic(Lebanon) arabic-support ar_LB
Arabic(LibyanArabJamahiriya) arabic-support ar_LY
Arabic(Morocco) arabic-support ar_MA
Arabic(Oman) arabic-support ar_OM
Arabic(Qatar) arabic-support ar_QA
Arabic(SaudiArabia) arabic-support ar_SA
Arabic(Sudan) arabic-support ar_SD
Arabic(SyrianArabRepublic) arabic-support ar_SY
Arabic(Tunisia) arabic-support ar_TN
Arabic(UnitedArabEmirates) arabic-support ar_AE
Arabic(Yemen) arabic-support ar_YE
Assamese(India) assamese-support as_IN
Asturian(Spain)   ast_ES
Basque(Spain)   eu_ES
Belarusian   be_BY
Bengali(BD) bengali-support bn_BD
Bengali(India) bengali-support bn_IN
Bosnian(BosniaandHerzegowina)   bs_BA
Breton(France)   br_FR
Bulgarian-Български   bg_BG
Catalan(Spain)   ca_ES
Chinese(HongKong)   zh_HK
Chinese(P.R.ofChina)-中文(简体) simplified-chinese-support zh_CN
Chinese(Taiwan)-傳統漢語 traditional-chinese-support zh_TW
Cornish(Britain)   kw_GB
Croatian   hr_HR
Czech-Českárepublika   cs_CZ
Danish-Dansk   da_DK
Dutch(Belgium)   nl_BE
Dutch(Netherlands)   nl_NL
English(Australia)   en_AU
English(Botswana)   en_BW
English(Canada)   en_CA
English(Denmark)   en_DK
English(GreatBritain)   en_GB
English(HongKong)   en_HK
English(India)   en_IN
English(Ireland)   en_IE
English(NewZealand)   en_NZ
English(Philippines)   en_PH
English(Singapore)   en_SG
English(SouthAfrica)   en_ZA
English(USA)   en_US
English(Zimbabwe)   en_ZW
Estonian   et_EE
Faroese(FaroeIslands)   fo_FO
Finnish finnish-support fi_FI
French(Belgium)   fr_BE
French(Canada)   fr_CA
French(France)-Français   fr_FR
French(Luxemburg)   fr_LU
French(Switzerland)   fr_CH
Galician(Spain)   gl_ES
German(Austria)   de_AT
German(Belgium)   de_BE
German(Germany)-Deutsch   de_DE
LowGerman(Germany)-Deutsch   nds_DE
German(Luxemburg)   de_LU
German(Switzerland)   de_CH
Greek greek-support el_GR
Greenlandic(Greenland)   kl_GL
Gujarati(India) gujarati-support gu_IN
Hebrew(Israel) hebrew-support he_IL
Hindi(India) hindi-support hi_IN
Hungarian   hu_HU
Icelandic-Íslenska   is_IS
Indonesian   id_ID
Irish   ga_IE
Italian(Italy)Italiano   it_IT
Italian(Switzerland)   it_CH
Japanese-日本語 japanese-support ja_JP
Kannada(India) kannada-support kn_IN
Kashmiri(India) kashmiri-support ks_IN
Korean(RepublicofKorea)-한국어 korean-support ko_KR
Lao(Laos)   lo_LA
Latvian(Latvia)   lv_LV
Lithuanian   lt_LT
Macedonian   mk_MK
Maithili(India) maithili-support mai_IN
Malayalam(India) malayalam-support ml_IN
Malay(Malaysia)   ms_MY
Maltese(malta)   mt_MT
ManxGaelic(Britain)   gv_GB
Marathi(India) marathi-support mr_IN
NorthernSaami(Norway)   se_NO
Nepali(Nepal) nepali-support ne_NP
Norwegian-Norsk   nb_NO
Norwegian,Nynorsk(Norway)-Norsk   nn_NO
Occitan(France)   oc_FR
Oriya(India) oriya-support or_IN
Persian(Iran) persian-support fa_IR
Polish   pl_PL
Portuguese(Brasil)   pt_BR
Portuguese(Portugal)-Português   pt_PT
Punjabi(India) punjabi-support pa_IN
Romanian   ro_RO
Russian-Русский russian-support ru_RU
Russian(Ukraine) russian-support ru_UA
Serbian   sr_RS
Serbian(Latin)   sr_RS.UTF-8@latin
Sinhala sinhala-support si_LK
Slovak   sk_SK
Slovenian(Slovenia)-slovenščina   sl_SI
Spanish(Argentina)   es_AR
Spanish(Bolivia)   es_BO
Spanish(Chile)   es_CL
Spanish(Colombia)   es_CO
Spanish(CostaRica)   es_CR
Spanish(DominicanRepublic)   es_DO
Spanish(ElSalvador)   es_SV
Spanish(Equador)   es_EC
Spanish(Guatemala)   es_GT
Spanish(Honduras)   es_HN
Spanish(Mexico)   es_MX
Spanish(Nicaragua)   es_NI
Spanish(Panama)   es_PA
Spanish(Paraguay)   es_PY
Spanish(Peru)   es_PE
Spanish(PuertoRico)   es_PR
Spanish(Spain)-Español   es_ES
Spanish(USA)   es_US
Spanish(Uruguay)   es_UY
Spanish(Venezuela)   es_VE
Swedish(Finland)   sv_FI
Swedish(Sweden)-Svenska   sv_SE
Tagalog(Philippines)   tl_PH
Tamil(India) tamil-support ta_IN
Telugu(India) telugu-support te_IN
Thai thai-support th_TH
Turkish   tr_TR
Ukrainian   uk_UA
Urdu(Pakistan) urdu-support ur_PK
Uzbek(Uzbekistan)   uz_UZ
Vietnamese   vi_VN
Walloon(Belgium)   wa_BE@euro
Welsh(GreatBritain)   cy_GB
Xhosa(SouthAfrica)   xh_ZA
Zulu(SouthAfrica)   zu_ZA

-------------------------------以下为在linux下用yum安装亚洲的语言支持----------------------------------------

In newer versions of RHEL, such as RHEL 6 (CentOS 6 specifically), the language font group packages are no longer available. Instead, these releases have “groupinstall” lists which bundle multiple packages together. In order to see all language packages available through this interface, you can type the following command:

# yum grouplist

This will output all group packages, the last section of which is “Available Language Groups”. Note that some packs may already be installed, in which case, they will be visible under “Installed Language Packs” at the top of the list. In this case, “chinese-fonts” is now “Chinese Support”.

To install this package, run the following command:

# yum groupinstall "Chinese Support"
# yum groupinstall "Japanese Support"
# yum groupinstall "Korean Support"
# yum groupinstall "Kannada Support"
# yum groupinstall "Hindi Support"


你可能感兴趣的:(linux)