将 manpages-zh-1.5.1.tar.gz 源码包下载到本地
http://pkgs.fedoraproject.org/repo/pkgs/man-pages-zh-CN/manpages-zh-1.5.1.tar.gz/13275fd039de8788b15151c896150bc4/ 安装 lrzsz 工具
[root@centos7 ~]# cd /usr/local/src[root@centos7 src]# yum install -y lrzsz已加载插件:fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com正在解决依赖关系--> 正在检查事务---> 软件包 lrzsz.x86_64.0.0.12.20-36.el7 将被 安装--> 解决依赖关系完成依赖关系解决======================================================================== Package 架构 版本 源 大小========================================================================正在安装: lrzsz x86_64 0.12.20-36.el7 base 78 k事务概要========================================================================安装 1 软件包总下载量:78 k安装大小:181 kDownloading packages:lrzsz-0.12.20-36.el7.x86_64.rpm | 78 kB 00:00 Running transaction checkRunning transaction testTransaction test succeededRunning transaction 正在安装 : lrzsz-0.12.20-36.el7.x86_64 1/1 验证中 : lrzsz-0.12.20-36.el7.x86_64 1/1 已安装: lrzsz.x86_64 0:0.12.20-36.el7 完毕![root@centos7 src]# lsmanpages-zh-1.5.1.tar.gz[root@centos7 src]# sz manpages-zh-1.5.1.tar.gz rz zmodem trl+C ȡ 100% 1 KB 1 KB/s 00:00:01 0 Errorsgz...上传源码包
[root@centos7 src]# rm -rf *[root@centos7 src]# ls[root@centos7 src]# rzrz waiting to receive. zmodem trl+C ȡ 100% 1919 KB 1919 KB/s 00:00:01 0 Errorsgz...[root@centos7 src]# lsmanpages-zh-1.5.1.tar.gz[root@centos7 src]# file manpages-zh-1.5.1.tar.gz manpages-zh-1.5.1.tar.gz: gzip compressed data, from Unix, last modified: Thu Apr 3 23:29:16 2008, max compression[root@centos7 src]# tar xf manpages-zh-1.5.1.tar.gz [root@centos7 src]# lsmanpages-zh-1.5.1 manpages-zh-1.5.1.tar.gz[root@centos7 src]# cd manpages-zh-1.5.1[root@centos7 manpages-zh-1.5.1]# lsaclocal.m4 configure DOCS Makefile.am NEWS utilsAUTHORS configure.in INSTALL Makefile.in READMEChangeLog COPYING install-sh missing src关闭 zhtw
[root@centos7 manpages-zh-1.5.1]# ./configure --disable-zhtwchecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /usr/bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking whether to enable maintainer-specific portions of Makefiles... noconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating DOCS/Makefileconfig.status: creating src/Makefileconfig.status: creating src/man1/Makefileconfig.status: creating src/man1/zh_CN/Makefileconfig.status: creating src/man1/zh_TW/Makefileconfig.status: creating src/man2/Makefileconfig.status: creating src/man2/zh_CN/Makefileconfig.status: creating src/man2/zh_TW/Makefileconfig.status: creating src/man3/Makefileconfig.status: creating src/man3/zh_CN/Makefileconfig.status: creating src/man3/zh_TW/Makefileconfig.status: creating src/man4/Makefileconfig.status: creating src/man4/zh_CN/Makefileconfig.status: creating src/man4/zh_TW/Makefileconfig.status: creating src/man5/Makefileconfig.status: creating src/man5/zh_CN/Makefileconfig.status: creating src/man5/zh_TW/Makefileconfig.status: creating src/man6/Makefileconfig.status: creating src/man6/zh_CN/Makefileconfig.status: creating src/man6/zh_TW/Makefileconfig.status: creating src/man7/Makefileconfig.status: creating src/man7/zh_CN/Makefileconfig.status: creating src/man7/zh_TW/Makefileconfig.status: creating src/man8/Makefileconfig.status: creating src/man8/zh_CN/Makefileconfig.status: creating src/man8/zh_TW/Makefileconfig.status: creating src/mann/Makefileconfig.status: creating src/mann/zh_CN/Makefileconfig.status: creating src/mann/zh_TW/Makefileconfig.status: creating utils/Makefilemanpages-zh configure summary=============================UTF-8 : truezh_CN : truezh_TW : false编译安装
[root@centos7 manpages-zh-1.5.1]# make && make install设置环境变量
[root@centos7 manpages-zh-1.5.1]# vim /etc/profile.d/cman.sh #新文件#输入以下内容alias cman='man -M /usr/local/share/man/zh_CN'执行别名文件让该文件生效
[root@centos7 manpages-zh-1.5.1]# source /etc/profile.d/cman.sh执行 man ls 或者 cman ls 查看配置结果是否成功
[root@centos7 manpages-zh-1.5.1]# cman lsLS(1) General Commands Manual LS(1)NAME ls, dir, vdir - 列目录内容提要 ls [选项] [文件名...] POSIX 标准选项: [-CFRacdilqrtu1]GNU 选项 (短格式): [-1abcdfgiklmnopqrstuxABCDFGLNQRSUX] [-w cols] [-T cols] [-I pattern] [--full-time] [--format={long,verbose,commas,across,vertical,single-column}] [--sort={none,time,size,extension}] [--time={atime,access,use,ctime,status}] [--color[={none,auto,always}]] [--help] [--version] [--]描述( DESCRIPTION )总结
以上就是配置 CentOS 7 man 命令帮助显示简体中文的方法,最后用 cman 来测试,大家可以去尝试用 man 来测试一下,希望能给大家带来帮助。
|