123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
- ]>
- <sect1 id="ch-system-man-db" role="wrap">
- <?dbhtml filename="man-db.html"?>
- <sect1info condition="script">
- <productname>man-db</productname>
- <productnumber>&man-db-version;</productnumber>
- <address>&man-db-url;</address>
- </sect1info>
- <title>Man-DB-&man-db-version;</title>
- <indexterm zone="ch-system-man-db">
- <primary sortas="a-Man-DB">Man-DB</primary>
- </indexterm>
- <sect2 role="package">
- <title/>
- <para>Man-DB 软件包包含查找和阅读 man 页面的程序。</para>
- <segmentedlist>
- <segtitle>&buildtime;</segtitle>
- <segtitle>&diskspace;</segtitle>
- <seglistitem>
- <seg>&man-db-ch6-sbu;</seg>
- <seg>&man-db-ch6-du;</seg>
- </seglistitem>
- </segmentedlist>
- </sect2>
- <sect2 role="installation">
- <title>安装 Man-DB</title>
- <para>准备安装 Man-DB:</para>
- <screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \
- --docdir=/usr/share/doc/man-db-&man-db-version; \
- --sysconfdir=/etc \
- --disable-setuid \
- --enable-cache-owner=bin \
- --with-browser=/usr/bin/lynx \
- --with-vgrind=/usr/bin/vgrind \
- --with-grap=/usr/bin/grap</userinput></screen>
- <screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
- --docdir=/usr/share/doc/man-db-&man-db-version; \
- --sysconfdir=/etc \
- --disable-setuid \
- --enable-cache-owner=bin \
- --with-browser=/usr/bin/lynx \
- --with-vgrind=/usr/bin/vgrind \
- --with-grap=/usr/bin/grap \
- --with-systemdtmpfilesdir=</userinput></screen>
- <variablelist>
- <title>配置选项的含义:</title>
- <varlistentry>
- <term><parameter>--disable-setuid</parameter></term>
- <listitem>
- <para>该选项防止将 <command>man</command> 程序 setuid
- 到用户 <systemitem class="username">man</systemitem>。</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>--enable-cache-owner=bin</parameter></term>
- <listitem>
- <para>该选项使得系统范围的缓存文件所有者为用户 bin。</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>--with-...</parameter></term>
- <listitem>
- <para>这三个选项设定一些默认程序。
- <command>lynx</command> 是基于文本的 web 浏览器 (安装过程可在
- BLFS 中查阅), <command>vgrind</command>
- 将程序源代码转换成 Groff 输入,<command>grap</command>
- 用于在 Groff 文档中画图。
- <command>vgrind</command> 和 <command>grap</command>
- 在阅读 man 手册页面时一般用不到,它们不是 LFS 或 BLFS 的一部分,
- 但如果需要的话,您应该可以在完成 LFS 的构建后自行安装它们。</para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>编译该软件包:</para>
- <screen><userinput remap="make">make</userinput></screen>
- <para>运行以下命令以测试编译结果:</para>
- <screen><userinput remap="test">make check</userinput></screen>
- <para>安装该软件包:</para>
- <screen><userinput remap="install">make install</userinput></screen>
- <!--
- <para revision="systemd">删除一个对不存在用户的引用:</para>
- <screen revision="systemd"><userinput remap="install">sed -i "s:man man:root root:g" /usr/lib/tmpfiles.d/man-db.conf</userinput></screen>
- -->
- </sect2>
- <sect2>
- <title>LFS 中的非英文 man 手册页面</title>
- <para>下表展示了 Man-DB 假定的安装在
- <filename class="directory">/usr/share/man/<ll></filename>
- 中的 man 手册页面的编码字符集。
- 另外,Man-DB 还能正确地判断出这些页面是否为 UTF-8 编码。</para>
- <!-- Origin: man-db-2.5.9/lib/encodings.c -->
- <table>
- <title>传统 8 位 man 手册页面的预期字符编码</title>
- <?dbfo table-width="6in" ?>
- <tgroup cols="4">
- <colspec colnum="1" colwidth="1.5in"/>
- <colspec colnum="2" colwidth="1in"/>
- <colspec colnum="3" colwidth="2.5in"/>
- <colspec colnum="4" colwidth="1in"/>
- <thead>
- <row>
- <entry>语言 (代号)</entry>
- <entry>编码</entry>
- <entry>语言 (代号)</entry>
- <entry>编码</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>丹麦语 (da)</entry>
- <entry>ISO-8859-1</entry>
- <entry>克罗地亚语 (hr)</entry>
- <entry>ISO-8859-2</entry>
- </row>
- <row>
- <entry>德语 (de)</entry>
- <entry>ISO-8859-1</entry>
- <entry>匈牙利语 (hu)</entry>
- <entry>ISO-8859-2</entry>
- </row>
- <row>
- <entry>英语 (en)</entry>
- <entry>ISO-8859-1</entry>
- <entry>日语 (ja)</entry>
- <entry>EUC-JP</entry>
- </row>
- <row>
- <entry>西班牙语 (es)</entry>
- <entry>ISO-8859-1</entry>
- <entry>朝鲜语 (ko)</entry>
- <entry>EUC-KR</entry>
- </row>
- <row>
- <entry>爱沙尼亚语 (et)</entry>
- <entry>ISO-8859-1</entry>
- <entry>立陶宛语 (lt)</entry>
- <entry>ISO-8859-13</entry>
- </row>
- <row>
- <entry>芬兰语 (fi)</entry>
- <entry>ISO-8859-1</entry>
- <entry>拉脱维亚语 (lv)</entry>
- <entry>ISO-8859-13</entry>
- </row>
- <row>
- <entry>法语 (fr)</entry>
- <entry>ISO-8859-1</entry>
- <entry>马其顿语 (mk)</entry>
- <entry>ISO-8859-5</entry>
- </row>
- <row>
- <entry>爱尔兰语 (ga)</entry>
- <entry>ISO-8859-1</entry>
- <entry>波兰语 (pl)</entry>
- <entry>ISO-8859-2</entry>
- </row>
- <row>
- <entry>加利西亚语 (gl)</entry>
- <entry>ISO-8859-1</entry>
- <entry>罗马尼亚语 (ro)</entry>
- <entry>ISO-8859-2</entry>
- </row>
- <row>
- <entry>印尼语 (id)</entry>
- <entry>ISO-8859-1</entry>
- <entry>俄语 (ru)</entry>
- <entry>KOI8-R</entry>
- </row>
- <row>
- <entry>冰岛语 (is)</entry>
- <entry>ISO-8859-1</entry>
- <entry>斯洛伐克语 (sk)</entry>
- <entry>ISO-8859-2</entry>
- </row>
- <row>
- <entry>意大利语 (it)</entry>
- <entry>ISO-8859-1</entry>
- <entry>斯洛文尼亚语 (sl)</entry>
- <entry>ISO-8859-2</entry>
- </row>
- <row>
- <entry>挪威语(波克默尔语) (nb)</entry>
- <entry>ISO-8859-1</entry>
- <entry>塞尔维亚语(拉丁文) (sr@latin)</entry>
- <entry>ISO-8859-2</entry>
- </row>
- <row>
- <entry>荷兰语 (nl)</entry>
- <entry>ISO-8859-1</entry>
- <entry>塞尔维亚语 (sr)</entry>
- <entry>ISO-8859-5</entry>
- </row>
- <row>
- <entry>新挪威语 (nn)</entry>
- <entry>ISO-8859-1</entry>
- <entry>土耳其语 (tr)</entry>
- <entry>ISO-8859-9</entry>
- </row>
- <row>
- <entry>挪威语 (no)</entry>
- <entry>ISO-8859-1</entry>
- <entry>乌克兰语 (uk)</entry>
- <entry>KOI8-U</entry>
- </row>
- <row>
- <entry>葡萄牙语 (pt)</entry>
- <entry>ISO-8859-1</entry>
- <entry>越南语 (vi)</entry>
- <entry>TCVN5712-1</entry>
- </row>
- <row>
- <entry>瑞典语 (sv)</entry>
- <entry>ISO-8859-1</entry>
- <entry>简体中文 (zh_CN)</entry>
- <entry>GBK</entry>
- </row>
- <row>
- <entry>白罗斯语 (be)</entry>
- <entry>CP1251</entry>
- <entry>简体中文,新加坡 (zh_SG)</entry>
- <entry>GBK</entry>
- </row>
- <row>
- <entry>保加利亚语 (bg)</entry>
- <entry>CP1251</entry>
- <entry>繁体中文,香港特别行政区 (zh_HK)</entry>
- <entry>BIG5HKSCS</entry>
- </row>
- <row>
- <entry>捷克语 (cs)</entry>
- <entry>ISO-8859-2</entry>
- <entry>繁体中文,台湾省 (zh_TW)</entry>
- <entry>BIG5</entry>
- </row>
- <row>
- <entry>希腊文 (el)</entry>
- <entry>ISO-8859-7</entry>
- <entry></entry>
- <entry></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <note>
- <para>用该表之外的语言编写的 man 手册页面不被支持。</para>
- </note>
- </sect2>
- <sect2 id="contents-man-db" role="content">
- <title>Man-DB 的内容</title>
- <segmentedlist>
- <segtitle>安装的程序</segtitle>
- <segtitle>安装的库</segtitle>
- <segtitle>安装的目录</segtitle>
- <seglistitem>
- <seg>accessdb, apropos (到 whatis 的链接), catman, lexgrog, man, mandb,
- manpath, 以及 whatis</seg>
- <seg>libman.so 和 libmandb.so</seg>
- <seg>/usr/lib/man-db, /usr/lib/tmpfiles.d, /usr/libexec/man-db,
- 以及 /usr/share/doc/man-db-&man-db-version;</seg>
- </seglistitem>
- </segmentedlist>
- <variablelist>
- <bridgehead renderas="sect3">简要描述</bridgehead>
- <?dbfo list-presentation="list"?>
- <?dbhtml list-presentation="table"?>
- <varlistentry id="accessdb">
- <term><command>accessdb</command></term>
- <listitem>
- <para>将 <command>whatis</command> 数据库内容转储为人类可读格式
- </para>
- <indexterm zone="ch-system-man-db accessdb">
- <primary sortas="b-accessdb">accessdb</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="apropos">
- <term><command>apropos</command></term>
- <listitem>
- <para>搜索 <command>whatis</command> 数据库,
- 显示包含给定字符串的系统命令的简要描述</para>
- <indexterm zone="ch-system-man-db apropos">
- <primary sortas="b-apropos">apropos</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="catman">
- <term><command>catman</command></term>
- <listitem>
- <para>创建或更新预先格式化的 man 手册页面</para>
- <indexterm zone="ch-system-man-db catman">
- <primary sortas="b-catman">catman</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="lexgrog">
- <term><command>lexgrog</command></term>
- <listitem>
- <para>显示给定 man 手册页面的单行摘要信息</para>
- <indexterm zone="ch-system-man-db lexgrog">
- <primary sortas="b-lexgrog">lexgrog</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="man">
- <term><command>man</command></term>
- <listitem>
- <para>格式化并显示请求的 man 手册页面</para>
- <indexterm zone="ch-system-man-db man">
- <primary sortas="b-man">man</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="mandb">
- <term><command>mandb</command></term>
- <listitem>
- <para>创建或更新 <command>whatis</command> 数据库</para>
- <indexterm zone="ch-system-man-db mandb">
- <primary sortas="b-mandb">mandb</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="manpath">
- <term><command>manpath</command></term>
- <listitem>
- <para>显示 $MANPATH 的内容,或者(如果 $MATHPATH 未设定)
- 根据 man.conf 和用户环境确定的合适搜索路径</para>
- <indexterm zone="ch-system-man-db manpath">
- <primary sortas="b-manpath">manpath</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="whatis">
- <term><command>whatis</command></term>
- <listitem>
- <para>搜索 <command>whatis</command> 数据库,
- 显示包含给定关键词的系统命令的简要描述</para>
- <indexterm zone="ch-system-man-db whatis">
- <primary sortas="b-whatis">whatis</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="libman">
- <term><filename class="libraryfile">libman</filename></term>
- <listitem>
- <para>包含 <command>man</command> 运行时支持</para>
- <indexterm zone="ch-system-man-db libman">
- <primary sortas="c-libman">libman</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="libmandb">
- <term><filename class="libraryfile">libmandb</filename></term>
- <listitem>
- <para>包含 <command>man</command> 运行时支持</para>
- <indexterm zone="ch-system-man-db libmandb">
- <primary sortas="c-libmandb">libmandb</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- </variablelist>
- </sect2>
- </sect1>
|