首頁  >  文章  >  系統教程  >  Centos7.2使用中文man詳解

Centos7.2使用中文man詳解

PHPz
PHPz轉載
2024-01-06 23:18:041044瀏覽

先修改系統設定檔/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_centos tmp]# tar -jxvf manpages-zh-1.5.2.tar.bz2 

##manpages-zh-1.5.2/

manpages-zh-1.5.2/missing

manpages-zh-1.5.2/COPYING

manpages-zh-1.5.2/Makefile.in

#manpages-zh-1.5.2/ChangeLog

##manpages-zh-1.5.2/src/

manpages-zh-1.5.2/src/mann/

...

透過$?查看指令執行結果,0則成功

#echo $?  (0則成功)

[root@VM_13_60_centos tmp]# echo $?

0

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

#[root@VM_13_60_centos tmp]# cd /tmp/manpages-zh-1.5.2/

[root@VM_13_60_centos manpages-zh-1.5.2]# ls

aclocal.m4  AUTHORS  ChangeLog  configure  configure.in  COPYING  DOCS  INSTALL  configure  

[root@VM_13_60_centos manpages-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生效)

Centos7.2使用中文man詳解測試中文man:

#### cman ln### ##########

以上是Centos7.2使用中文man詳解的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:jb51.net。如有侵權,請聯絡admin@php.cn刪除