歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> 學習Linux >> Centos7.2使用中文man

Centos7.2使用中文man

日期:2017/3/3 17:34:10   编辑:學習Linux

Centos7.2使用中文man


熱度3 評論 118 www.BkJia.Com 網友分享於: 2017-02-10 07:02:02 浏覽數41009次

Centos7.2使用中文man


首先修改系統配置文件/etc/locale.conf(低版本對應文件為/etc/sysconfig/i18n)內容為 LANG="zh_CN.UTF-8" 保存退出,重啟linux。

點擊下載中文man源碼包(鏈接如果失效可以下載附件文件)

把解壓出來的manpages-zh-1.5.2.tar.bz2上傳到服務器上。

解壓:

gz解包命令: tar -zxvf

bz2解包命令:tar -jxvf

[root@VM_13_60_centostmp]#tar-jxvfmanpages-zh-1.5.2.tar.bz2manpages-zh-1.5.2/manpages-zh-1.5.2/missingmanpages-zh-1.5.2/COPYINGmanpages-zh-1.5.2/Makefile.inmanpages-zh-1.5.2/ChangeLogmanpages-zh-1.5.2/src/manpages-zh-1.5.2/src/mann/...

通過$?查看命令執行結果,0則成功

#echo $?(0則成功)

[root@VM_13_60_centostmp]#echo$?0

進入manpages-zh-1.5.2目錄並執行./configure --prefix=/usr/local/zhman --disable-zhtw

[root@VM_13_60_centostmp]#cd/tmp/manpages-zh-1.5.2/[root@VM_13_60_centosmanpages-zh-1.5.2]#lsaclocal.m4AUTHORSChangeLogconfigureconfigure.inCOPYINGDOCSINSTALLinstall-shMakefile.amMakefile.inmissingNEWSREADMEsrcutils[root@VM_13_60_centosmanpages-zh-1.5.2]#./configure--prefix=/usr/local/zhman--disable-zhtw

#make && make install (沒安裝make工具的請yum或apt)

家目錄下創建.bash_profile 文件 (粘貼alias cman='man -M/usr/local/zhman/share/man/zh_CN' 保存)

#source .bash_profile(為了讓剛剛添加的alias生效)

測試中文man:

# cman ln

http://www.bkjia.com/Linuxjc/1192015.html TechArticle

Copyright © Linux教程網 All Rights Reserved