本篇设置中文显示和设置帮助文档为中文。
1.设置系统默认语言为中文(对应每个shell而言,重启后会变成英文,所以每次都需要执行)
echo $LANG
输出:en_US.UTF-8 (此时为英文)
LANG=zh_CN.UTF-8
echo $LANG
输出:zh_CN.UTF-8 (此时为中文)
2.安装中文支持
•yum groupinstall "Chinese Support"
3.增加epel的repo:
打开mirrors.aliyun.com或https://opsx.alibaba.com/mirror网站。
备份epel源(如果有)
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
安装epel配置文件(具体根据系统版本和实际源修改)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
3.清除本地依赖关系
因为每个网站的依赖关系不同所以在使用前需要清除本地依赖文件。
yum clean all
yum makecache
4.安装man-pages
yum search man-pages
yum install man man-pages man-pages-zh-CN
5.验证
使用man bash 查看帮助文档,此时为中文显示。
注意:重启后需要重新执行第一步,即设置系统语言为中文。