歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux系統安裝中文環境,中文幫助,中文輸入法的實現

Linux系統安裝中文環境,中文幫助,中文輸入法的實現

日期:2017/2/28 14:36:41   编辑:Linux教程

在工作中和一些同事常常抱怨自己的英文不是很好,閱讀一些錯誤信息和配置文檔往往不是隨心隨手,現在我就將把Linux系統一些主要的英文文檔設置成中文,希望在此過程中對大家有幫助。

1.系統是英文的,現在將英文變為中文
[root@node1 ~]# locale -a | grep -i zh_cn.utf8 --查看系統是否安裝中文環境
[root@node1 ~]# yum grouplist |grep -i chinese --查看倉庫是否有中文包
[root@node1 ~]# yum groupinstall Chinese-support --安裝中文語言包

2.更改系統語言環境
[root@node1 ~]# echo $LANG --查看當前的語言環境
[root@node1 ~]# /etc/init.d/httpd restart --重啟任意服務,現在是英文
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 2.2.2.27 for ServerName
[ OK ]
[root@node1 ~]# LANG=zh_CN.utf8 --設置中文環境(臨時的)
[root@node1 ~]# echo $LANG --檢查語言環境
zh_CN.utf8
[root@node1 ~]# /etc/init.d/httpd restart --重啟任意服務,變成中文了
停止 httpd: [確定]
正在啟動 httpd:httpd: Could not reliably determine the server's fully qualified domain name, using 2.2.2.27 for ServerName
[確定]
[root@node1 ~]# vim /etc/sysconfig/i18n --永久生效(修改配置文件)
LANG="zh_CN.utf8" --修改配置文件

3.下載中文幫助軟件並安裝測試
[root@node1 cheng]# wget http://manpages-zh.googlecode.com/files/manpages-zh-1.5.1.tar.gz
--2014-01-16 16:27:39-- http://manpages-zh.googlecode.com/files/manpages-zh-1.5.1.tar.gz
Resolving manpages-zh.googlecode.com... 173.194.72.82, 2404:6800:4008:c01::52
Connecting to manpages-zh.googlecode.com|173.194.72.82|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1965336 (1.9M) [application/x-gzip]
Saving to: “manpages-zh-1.5.1.tar.gz”
100%[=========================================================================>] 1,965,336 400K/s in 4.8s
2014-01-16 16:27:44 (400 KB/s) - “manpages-zh-1.5.1.tar.gz” saved [1965336/1965336]
[root@node1 cheng]# tar xvf manpages-zh-1.5.1.tar.gz --解開軟件包
[root@node1 cheng]# cd manpages-zh-1.5.1
[root@node1 manpages-zh-1.5.1]# ./configure --prefix=/usr/local/zhman --disable-zhtw
[root@node1 manpages-zh-1.5.1]# make && make install --安裝軟件
[root@node1 manpages-zh-1.5.1]# vim ~/.bash_profile
alias cman='man -M /usr/local/zhman/share/man/zh_CN' --添加這一行
[root@node1 manpages-zh-1.5.1]# source ~/.bash_profile --使配置文件生效
[root@node1 manpages-zh-1.5.1]# cman iptables --可以看到中文幫助了

4.在系統中安裝中文輸入法
1.用root用戶登陸
2.yum install "@Chinese Support"
3.exit
4.回到桌面,system->preferences->input method
5.如果沒有,先注銷一下
6.按照提示添加輸入法
7.最後再次注銷,登錄即可

Copyright © Linux教程網 All Rights Reserved