1
0

man-db.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-man-db" role="wrap">
  8. <?dbhtml filename="man-db.html"?>
  9. <sect1info condition="script">
  10. <productname>man-db</productname>
  11. <productnumber>&man-db-version;</productnumber>
  12. <address>&man-db-url;</address>
  13. </sect1info>
  14. <title>Man-DB-&man-db-version;</title>
  15. <indexterm zone="ch-system-man-db">
  16. <primary sortas="a-Man-DB">Man-DB</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>Man-DB 软件包包含查找和阅读 man 页面的程序。</para>
  21. <segmentedlist>
  22. <segtitle>&buildtime;</segtitle>
  23. <segtitle>&diskspace;</segtitle>
  24. <seglistitem>
  25. <seg>&man-db-ch6-sbu;</seg>
  26. <seg>&man-db-ch6-du;</seg>
  27. </seglistitem>
  28. </segmentedlist>
  29. </sect2>
  30. <sect2 role="installation">
  31. <title>安装 Man-DB</title>
  32. <para>准备安装 Man-DB:</para>
  33. <screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \
  34. --docdir=/usr/share/doc/man-db-&man-db-version; \
  35. --sysconfdir=/etc \
  36. --disable-setuid \
  37. --enable-cache-owner=bin \
  38. --with-browser=/usr/bin/lynx \
  39. --with-vgrind=/usr/bin/vgrind \
  40. --with-grap=/usr/bin/grap</userinput></screen>
  41. <screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
  42. --docdir=/usr/share/doc/man-db-&man-db-version; \
  43. --sysconfdir=/etc \
  44. --disable-setuid \
  45. --enable-cache-owner=bin \
  46. --with-browser=/usr/bin/lynx \
  47. --with-vgrind=/usr/bin/vgrind \
  48. --with-grap=/usr/bin/grap \
  49. --with-systemdtmpfilesdir=</userinput></screen>
  50. <variablelist>
  51. <title>配置选项的含义:</title>
  52. <varlistentry>
  53. <term><parameter>--disable-setuid</parameter></term>
  54. <listitem>
  55. <para>该选项防止将 <command>man</command> 程序 setuid
  56. 到用户 <systemitem class="username">man</systemitem>。</para>
  57. </listitem>
  58. </varlistentry>
  59. <varlistentry>
  60. <term><parameter>--enable-cache-owner=bin</parameter></term>
  61. <listitem>
  62. <para>该选项使得系统范围的缓存文件所有者为用户 bin。</para>
  63. </listitem>
  64. </varlistentry>
  65. <varlistentry>
  66. <term><parameter>--with-...</parameter></term>
  67. <listitem>
  68. <para>这三个选项设定一些默认程序。
  69. <command>lynx</command> 是基于文本的 web 浏览器 (安装过程可在
  70. BLFS 中查阅), <command>vgrind</command>
  71. 将程序源代码转换成 Groff 输入,<command>grap</command>
  72. 用于在 Groff 文档中画图。
  73. <command>vgrind</command> 和 <command>grap</command>
  74. 在阅读 man 手册页面时一般用不到,它们不是 LFS 或 BLFS 的一部分,
  75. 但如果需要的话,您应该可以在完成 LFS 的构建后自行安装它们。</para>
  76. </listitem>
  77. </varlistentry>
  78. </variablelist>
  79. <para>编译该软件包:</para>
  80. <screen><userinput remap="make">make</userinput></screen>
  81. <para>运行以下命令以测试编译结果:</para>
  82. <screen><userinput remap="test">make check</userinput></screen>
  83. <para>安装该软件包:</para>
  84. <screen><userinput remap="install">make install</userinput></screen>
  85. <!--
  86. <para revision="systemd">删除一个对不存在用户的引用:</para>
  87. <screen revision="systemd"><userinput remap="install">sed -i "s:man man:root root:g" /usr/lib/tmpfiles.d/man-db.conf</userinput></screen>
  88. -->
  89. </sect2>
  90. <sect2>
  91. <title>LFS 中的非英文 man 手册页面</title>
  92. <para>下表展示了 Man-DB 假定的安装在
  93. <filename class="directory">/usr/share/man/&lt;ll&gt;</filename>
  94. 中的 man 手册页面的编码字符集。
  95. 另外,Man-DB 还能正确地判断出这些页面是否为 UTF-8 编码。</para>
  96. <!-- Origin: man-db-2.5.9/lib/encodings.c -->
  97. <table>
  98. <title>传统 8 位 man 手册页面的预期字符编码</title>
  99. <?dbfo table-width="6in" ?>
  100. <tgroup cols="4">
  101. <colspec colnum="1" colwidth="1.5in"/>
  102. <colspec colnum="2" colwidth="1in"/>
  103. <colspec colnum="3" colwidth="2.5in"/>
  104. <colspec colnum="4" colwidth="1in"/>
  105. <thead>
  106. <row>
  107. <entry>语言 (代号)</entry>
  108. <entry>编码</entry>
  109. <entry>语言 (代号)</entry>
  110. <entry>编码</entry>
  111. </row>
  112. </thead>
  113. <tbody>
  114. <row>
  115. <entry>丹麦语 (da)</entry>
  116. <entry>ISO-8859-1</entry>
  117. <entry>克罗地亚语 (hr)</entry>
  118. <entry>ISO-8859-2</entry>
  119. </row>
  120. <row>
  121. <entry>德语 (de)</entry>
  122. <entry>ISO-8859-1</entry>
  123. <entry>匈牙利语 (hu)</entry>
  124. <entry>ISO-8859-2</entry>
  125. </row>
  126. <row>
  127. <entry>英语 (en)</entry>
  128. <entry>ISO-8859-1</entry>
  129. <entry>日语 (ja)</entry>
  130. <entry>EUC-JP</entry>
  131. </row>
  132. <row>
  133. <entry>西班牙语 (es)</entry>
  134. <entry>ISO-8859-1</entry>
  135. <entry>朝鲜语 (ko)</entry>
  136. <entry>EUC-KR</entry>
  137. </row>
  138. <row>
  139. <entry>爱沙尼亚语 (et)</entry>
  140. <entry>ISO-8859-1</entry>
  141. <entry>立陶宛语 (lt)</entry>
  142. <entry>ISO-8859-13</entry>
  143. </row>
  144. <row>
  145. <entry>芬兰语 (fi)</entry>
  146. <entry>ISO-8859-1</entry>
  147. <entry>拉脱维亚语 (lv)</entry>
  148. <entry>ISO-8859-13</entry>
  149. </row>
  150. <row>
  151. <entry>法语 (fr)</entry>
  152. <entry>ISO-8859-1</entry>
  153. <entry>马其顿语 (mk)</entry>
  154. <entry>ISO-8859-5</entry>
  155. </row>
  156. <row>
  157. <entry>爱尔兰语 (ga)</entry>
  158. <entry>ISO-8859-1</entry>
  159. <entry>波兰语 (pl)</entry>
  160. <entry>ISO-8859-2</entry>
  161. </row>
  162. <row>
  163. <entry>加利西亚语 (gl)</entry>
  164. <entry>ISO-8859-1</entry>
  165. <entry>罗马尼亚语 (ro)</entry>
  166. <entry>ISO-8859-2</entry>
  167. </row>
  168. <row>
  169. <entry>印尼语 (id)</entry>
  170. <entry>ISO-8859-1</entry>
  171. <entry>俄语 (ru)</entry>
  172. <entry>KOI8-R</entry>
  173. </row>
  174. <row>
  175. <entry>冰岛语 (is)</entry>
  176. <entry>ISO-8859-1</entry>
  177. <entry>斯洛伐克语 (sk)</entry>
  178. <entry>ISO-8859-2</entry>
  179. </row>
  180. <row>
  181. <entry>意大利语 (it)</entry>
  182. <entry>ISO-8859-1</entry>
  183. <entry>斯洛文尼亚语 (sl)</entry>
  184. <entry>ISO-8859-2</entry>
  185. </row>
  186. <row>
  187. <entry>挪威语(波克默尔语) (nb)</entry>
  188. <entry>ISO-8859-1</entry>
  189. <entry>塞尔维亚语(拉丁文) (sr@latin)</entry>
  190. <entry>ISO-8859-2</entry>
  191. </row>
  192. <row>
  193. <entry>荷兰语 (nl)</entry>
  194. <entry>ISO-8859-1</entry>
  195. <entry>塞尔维亚语 (sr)</entry>
  196. <entry>ISO-8859-5</entry>
  197. </row>
  198. <row>
  199. <entry>新挪威语 (nn)</entry>
  200. <entry>ISO-8859-1</entry>
  201. <entry>土耳其语 (tr)</entry>
  202. <entry>ISO-8859-9</entry>
  203. </row>
  204. <row>
  205. <entry>挪威语 (no)</entry>
  206. <entry>ISO-8859-1</entry>
  207. <entry>乌克兰语 (uk)</entry>
  208. <entry>KOI8-U</entry>
  209. </row>
  210. <row>
  211. <entry>葡萄牙语 (pt)</entry>
  212. <entry>ISO-8859-1</entry>
  213. <entry>越南语 (vi)</entry>
  214. <entry>TCVN5712-1</entry>
  215. </row>
  216. <row>
  217. <entry>瑞典语 (sv)</entry>
  218. <entry>ISO-8859-1</entry>
  219. <entry>简体中文 (zh_CN)</entry>
  220. <entry>GBK</entry>
  221. </row>
  222. <row>
  223. <entry>白罗斯语 (be)</entry>
  224. <entry>CP1251</entry>
  225. <entry>简体中文,新加坡 (zh_SG)</entry>
  226. <entry>GBK</entry>
  227. </row>
  228. <row>
  229. <entry>保加利亚语 (bg)</entry>
  230. <entry>CP1251</entry>
  231. <entry>繁体中文,香港特别行政区 (zh_HK)</entry>
  232. <entry>BIG5HKSCS</entry>
  233. </row>
  234. <row>
  235. <entry>捷克语 (cs)</entry>
  236. <entry>ISO-8859-2</entry>
  237. <entry>繁体中文,台湾省 (zh_TW)</entry>
  238. <entry>BIG5</entry>
  239. </row>
  240. <row>
  241. <entry>希腊文 (el)</entry>
  242. <entry>ISO-8859-7</entry>
  243. <entry></entry>
  244. <entry></entry>
  245. </row>
  246. </tbody>
  247. </tgroup>
  248. </table>
  249. <note>
  250. <para>用该表之外的语言编写的 man 手册页面不被支持。</para>
  251. </note>
  252. </sect2>
  253. <sect2 id="contents-man-db" role="content">
  254. <title>Man-DB 的内容</title>
  255. <segmentedlist>
  256. <segtitle>安装的程序</segtitle>
  257. <segtitle>安装的库</segtitle>
  258. <segtitle>安装的目录</segtitle>
  259. <seglistitem>
  260. <seg>accessdb, apropos (到 whatis 的链接), catman, lexgrog, man, mandb,
  261. manpath, 以及 whatis</seg>
  262. <seg>libman.so 和 libmandb.so</seg>
  263. <seg>/usr/lib/man-db, /usr/lib/tmpfiles.d, /usr/libexec/man-db,
  264. 以及 /usr/share/doc/man-db-&man-db-version;</seg>
  265. </seglistitem>
  266. </segmentedlist>
  267. <variablelist>
  268. <bridgehead renderas="sect3">简要描述</bridgehead>
  269. <?dbfo list-presentation="list"?>
  270. <?dbhtml list-presentation="table"?>
  271. <varlistentry id="accessdb">
  272. <term><command>accessdb</command></term>
  273. <listitem>
  274. <para>将 <command>whatis</command> 数据库内容转储为人类可读格式
  275. </para>
  276. <indexterm zone="ch-system-man-db accessdb">
  277. <primary sortas="b-accessdb">accessdb</primary>
  278. </indexterm>
  279. </listitem>
  280. </varlistentry>
  281. <varlistentry id="apropos">
  282. <term><command>apropos</command></term>
  283. <listitem>
  284. <para>搜索 <command>whatis</command> 数据库,
  285. 显示包含给定字符串的系统命令的简要描述</para>
  286. <indexterm zone="ch-system-man-db apropos">
  287. <primary sortas="b-apropos">apropos</primary>
  288. </indexterm>
  289. </listitem>
  290. </varlistentry>
  291. <varlistentry id="catman">
  292. <term><command>catman</command></term>
  293. <listitem>
  294. <para>创建或更新预先格式化的 man 手册页面</para>
  295. <indexterm zone="ch-system-man-db catman">
  296. <primary sortas="b-catman">catman</primary>
  297. </indexterm>
  298. </listitem>
  299. </varlistentry>
  300. <varlistentry id="lexgrog">
  301. <term><command>lexgrog</command></term>
  302. <listitem>
  303. <para>显示给定 man 手册页面的单行摘要信息</para>
  304. <indexterm zone="ch-system-man-db lexgrog">
  305. <primary sortas="b-lexgrog">lexgrog</primary>
  306. </indexterm>
  307. </listitem>
  308. </varlistentry>
  309. <varlistentry id="man">
  310. <term><command>man</command></term>
  311. <listitem>
  312. <para>格式化并显示请求的 man 手册页面</para>
  313. <indexterm zone="ch-system-man-db man">
  314. <primary sortas="b-man">man</primary>
  315. </indexterm>
  316. </listitem>
  317. </varlistentry>
  318. <varlistentry id="mandb">
  319. <term><command>mandb</command></term>
  320. <listitem>
  321. <para>创建或更新 <command>whatis</command> 数据库</para>
  322. <indexterm zone="ch-system-man-db mandb">
  323. <primary sortas="b-mandb">mandb</primary>
  324. </indexterm>
  325. </listitem>
  326. </varlistentry>
  327. <varlistentry id="manpath">
  328. <term><command>manpath</command></term>
  329. <listitem>
  330. <para>显示 $MANPATH 的内容,或者(如果 $MATHPATH 未设定)
  331. 根据 man.conf 和用户环境确定的合适搜索路径</para>
  332. <indexterm zone="ch-system-man-db manpath">
  333. <primary sortas="b-manpath">manpath</primary>
  334. </indexterm>
  335. </listitem>
  336. </varlistentry>
  337. <varlistentry id="whatis">
  338. <term><command>whatis</command></term>
  339. <listitem>
  340. <para>搜索 <command>whatis</command> 数据库,
  341. 显示包含给定关键词的系统命令的简要描述</para>
  342. <indexterm zone="ch-system-man-db whatis">
  343. <primary sortas="b-whatis">whatis</primary>
  344. </indexterm>
  345. </listitem>
  346. </varlistentry>
  347. <varlistentry id="libman">
  348. <term><filename class="libraryfile">libman</filename></term>
  349. <listitem>
  350. <para>包含 <command>man</command> 运行时支持</para>
  351. <indexterm zone="ch-system-man-db libman">
  352. <primary sortas="c-libman">libman</primary>
  353. </indexterm>
  354. </listitem>
  355. </varlistentry>
  356. <varlistentry id="libmandb">
  357. <term><filename class="libraryfile">libmandb</filename></term>
  358. <listitem>
  359. <para>包含 <command>man</command> 运行时支持</para>
  360. <indexterm zone="ch-system-man-db libmandb">
  361. <primary sortas="c-libmandb">libmandb</primary>
  362. </indexterm>
  363. </listitem>
  364. </varlistentry>
  365. </variablelist>
  366. </sect2>
  367. </sect1>