LoginSignup
4
1

More than 3 years have passed since last update.

CentOS8環境でmanpages-jaをインストールする

Posted at

CentOS8環境では、manpages-jaがパッケージで提供されていないので、日本語のマニュアルがほとんどない。catコマンドなど、基本的なコマンドのマニュアルも英語のものが提供される。
そのままでもいいんだけれど、日本語のマニュアルを入れてみようかなということで、以下でご提供いただいているファイルをダウンロードして、インストールしてみた。
https://linuxjm.osdn.jp/download.html

以下、実行した構文。
以下は、執筆時点の最新のアーカイブ(man-pages-ja-20210215.tar.gz)をダウンロードして、展開。展開したディレクトリをカレントディレクトリにする。

man-pages-jaアーカイブのダウンロードと展開
[...]# curl -O https://linuxjm.osdn.jp/man-pages-ja-20210215.tar.gz
...(実行結果省略)...
[...]# tar xzf man-pages-ja-20210215.tar.gz
[...]# cd man-pages-ja-20210215

以下は、インストール手順。
ほぼアーカイブの中に含まれるINSTALLファイルの通り。めちゃめちゃ親切に書かれている。
インストールに必要なパッケージをdnfでインストールしてから、make configを実行。インストールするマニュアル項目等の指定を行う。enterキーを押すと、既定値で進める。
その後、make installでインストール。
インストールしたマニュアルの索引情報を展開するためにmandbコマンドを実行。

man-pages-jaのインストール
[...]# dnf install perl-Env make
...(実行結果省略)...
[...]# make config
perl -w script/configure.perl
[INSTALLATION INFORMATION]
(just Return if you accept default)
   Install directory   [/usr/share/man/ja_JP.UTF-8] ?:
   compress manual with..
      0: none
      1: gzip
      2: bzip2
      3: compress
   select [0..3] : 1
   uname of page owner [root] ?:
   group of page owner [root] ?:

   Directory:    /usr/share/man/ja_JP.UTF-8
   Compression:  gzip
   Page uid/gid: root/root

All OK? (Yes, [C]ontinue / No, [R]eselect) : C
[INSTALL PACKAGE SELECTION]
(just Return if you accept default choice)
(you can change the default by editing script/pkgs.list)
   [ 0/120] shadow          [Y/n] ?:
...(以降省略)...
[...]# make install
...(実行結果省略)...
[...]# mandb
/usr/share/man/overrides 内の古いデータベース要素を取り除いています...
...(以降省略)...

これで、manコマンドを実行すると、日本語のマニュアルが表示される。もちろんLANG変数の設定とかで、日本語環境になっている必要あり。

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1