db.xml 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  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-db" role="wrap">
  8. <?dbhtml filename="db.html"?>
  9. <sect1info condition="script">
  10. <productname>db</productname>
  11. <productnumber>&db-version;</productnumber>
  12. <address>&db-url;</address>
  13. </sect1info>
  14. <title>Berkeley DB-&db-version;</title>
  15. <indexterm zone="ch-system-db">
  16. <primary sortas="a-Berkeley-DB">Berkeley DB</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Berkeley DB package contains programs and utilities used by many
  21. other applications for database related functions.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&db-ch6-sbu;</seg>
  27. <seg>&db-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. <tip>
  31. <title>Other Installation Possibilities</title>
  32. <para>There are instructions to build this package in the BLFS book if you
  33. need to build the RPC server or additional language bindings. The
  34. additional language bindings will require additional packages to be
  35. installed. See <ulink url="&blfs-root;view/svn/server/databases.html#db"/>
  36. for suggested installation instructions.</para>
  37. <para>Also, GDBM <emphasis>could</emphasis> be used in place of Berkeley
  38. DB to satisfy Man-DB. However, since Berkeley DB is considered a core part
  39. of the LFS build, it will not be listed as a dependency for any package in
  40. the BLFS book. Likewise, many hours go into testing LFS with Berkeley DB
  41. installed, not with GDBM. If you fully understand the risks versus
  42. benefits of using GDBM and wish to use it anyway, see the BLFS
  43. instructions located at <ulink
  44. url="&blfs-root;view/svn/general/gdbm.html"/></para>
  45. </tip>
  46. </sect2>
  47. <sect2 role="installation">
  48. <title>Installation of Berkeley DB</title>
  49. <para>There is an upstream patch for Berkeley DB that fixes a race condition. Apply it:</para>
  50. <screen><userinput remap="pre">patch -Np1 -i ../&db-fixes-patch;</userinput></screen>
  51. <para>Prepare Berkeley DB for compilation:</para>
  52. <screen><userinput remap="configure">cd build_unix
  53. ../dist/configure --prefix=/usr --enable-compat185 --enable-cxx</userinput></screen>
  54. <variablelist>
  55. <title>The meaning of the configure options:</title>
  56. <varlistentry>
  57. <term><parameter>--enable-compat185</parameter></term>
  58. <listitem>
  59. <para>This option enables building Berkeley DB 1.85 compatibility
  60. API.</para>
  61. </listitem>
  62. </varlistentry>
  63. <varlistentry>
  64. <term><parameter>--enable-cxx</parameter></term>
  65. <listitem>
  66. <para>This option enables building C++ API libraries.</para>
  67. </listitem>
  68. </varlistentry>
  69. </variablelist>
  70. <para>Compile the package:</para>
  71. <screen><userinput remap="make">make</userinput></screen>
  72. <para>It is not possible to test the package meaningfully, because
  73. that would involve building TCL bindings. TCL bindings cannot be
  74. built properly now because TCL is linked against Glibc in
  75. <filename class="directory">/tools</filename>, not against Glibc in
  76. <filename class="directory">/usr</filename>.</para>
  77. <para>Install the package:</para>
  78. <screen><userinput remap="install">make docdir=/usr/share/doc/db-&db-version; install</userinput></screen>
  79. <variablelist>
  80. <title>The meaning of the make parameter:</title>
  81. <varlistentry>
  82. <term><parameter>docdir=...</parameter></term>
  83. <listitem>
  84. <para>This variable specifies the correct place for the
  85. documentation.</para>
  86. </listitem>
  87. </varlistentry>
  88. </variablelist>
  89. <para>Fix the ownership of the installed documentation:</para>
  90. <screen><userinput remap="install">chown -Rv root:root /usr/share/doc/db-&db-version;</userinput></screen>
  91. </sect2>
  92. <sect2 id="contents-db" role="content">
  93. <title>Contents of Berkeley DB</title>
  94. <segmentedlist>
  95. <segtitle>Installed programs</segtitle>
  96. <segtitle>Installed libraries</segtitle>
  97. <seglistitem>
  98. <seg>db_archive, db_checkpoint, db_deadlock, db_dump, db_hotbackup,
  99. db_load, db_printlog, db_recover, db_stat, db_upgrade, and db_verify</seg>
  100. <seg>libdb.{so,ar}and libdb_cxx.r{o,ar}</seg>
  101. </seglistitem>
  102. </segmentedlist>
  103. <variablelist>
  104. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  105. <?dbfo list-presentation="list"?>
  106. <?dbhtml list-presentation="table"?>
  107. <varlistentry id="db_archive">
  108. <term><command>db_archive</command></term>
  109. <listitem>
  110. <para>Prints the pathnames of log files that are no longer in use</para>
  111. <indexterm zone="ch-system-db db_archive">
  112. <primary sortas="b-db_archive">db_archive</primary>
  113. </indexterm>
  114. </listitem>
  115. </varlistentry>
  116. <varlistentry id="db_checkpoint">
  117. <term><command>db_checkpoint</command></term>
  118. <listitem>
  119. <para>A daemon used to monitor and checkpoint database logs</para>
  120. <indexterm zone="ch-system-db db_checkpoint">
  121. <primary sortas="b-db_checkpoint">db_checkpoint</primary>
  122. </indexterm>
  123. </listitem>
  124. </varlistentry>
  125. <varlistentry id="db_deadlock">
  126. <term><command>db_deadlock</command></term>
  127. <listitem>
  128. <para>A daemon used to abort lock requests when deadlocks are
  129. detected</para>
  130. <indexterm zone="ch-system-db db_deadlock">
  131. <primary sortas="b-db_deadlock">db_deadlock</primary>
  132. </indexterm>
  133. </listitem>
  134. </varlistentry>
  135. <varlistentry id="db_dump">
  136. <term><command>db_dump</command></term>
  137. <listitem>
  138. <para>Converts database files to a plain-text file format readable
  139. by <command>db_load</command></para>
  140. <indexterm zone="ch-system-db db_dump">
  141. <primary sortas="b-db_dump">db_dump</primary>
  142. </indexterm>
  143. </listitem>
  144. </varlistentry>
  145. <varlistentry id="db_hotbackup">
  146. <term><command>db_hotbackup</command></term>
  147. <listitem>
  148. <para>Creates <quote>hot backup</quote> or <quote>hot failover</quote>
  149. snapshots of Berkeley DB databases</para>
  150. <indexterm zone="ch-system-db db_hotbackup">
  151. <primary sortas="b-db_hotbackup">db_hotbackup</primary>
  152. </indexterm>
  153. </listitem>
  154. </varlistentry>
  155. <varlistentry id="db_load">
  156. <term><command>db_load</command></term>
  157. <listitem>
  158. <para>Is used to create database files from plain-text files</para>
  159. <indexterm zone="ch-system-db db_load">
  160. <primary sortas="b-db_load">db_load</primary>
  161. </indexterm>
  162. </listitem>
  163. </varlistentry>
  164. <varlistentry id="db_printlog">
  165. <term><command>db_printlog</command></term>
  166. <listitem>
  167. <para>Converts database log files to human readable text</para>
  168. <indexterm zone="ch-system-db db_printlog">
  169. <primary sortas="b-db_printlog">db_printlog</primary>
  170. </indexterm>
  171. </listitem>
  172. </varlistentry>
  173. <varlistentry id="db_recover">
  174. <term><command>db_recover</command></term>
  175. <listitem>
  176. <para>Is used to restore a database to a consistent state after a
  177. failure</para>
  178. <indexterm zone="ch-system-db db_recover">
  179. <primary sortas="b-db_recover">db_recover</primary>
  180. </indexterm>
  181. </listitem>
  182. </varlistentry>
  183. <varlistentry id="db_stat">
  184. <term><command>db_stat</command></term>
  185. <listitem>
  186. <para>Displays statistics for Berkeley databases</para>
  187. <indexterm zone="ch-system-db db_stat">
  188. <primary sortas="b-db_stat">db_stat</primary>
  189. </indexterm>
  190. </listitem>
  191. </varlistentry>
  192. <varlistentry id="db_upgrade">
  193. <term><command>db_upgrade</command></term>
  194. <listitem>
  195. <para>Is used to upgrade database files to a newer version of
  196. Berkeley DB</para>
  197. <indexterm zone="ch-system-db db_upgrade">
  198. <primary sortas="b-db_upgrade">db_upgrade</primary>
  199. </indexterm>
  200. </listitem>
  201. </varlistentry>
  202. <varlistentry id="db_verify">
  203. <term><command>db_verify</command></term>
  204. <listitem>
  205. <para>Is used to run consistency checks on database files</para>
  206. <indexterm zone="ch-system-db db_verify">
  207. <primary sortas="b-db_verify">db_verify</primary>
  208. </indexterm>
  209. </listitem>
  210. </varlistentry>
  211. <varlistentry id="libdb">
  212. <term><filename class="libraryfile">libdb.{so,a}</filename></term>
  213. <listitem>
  214. <para>Contains functions to manipulate database files from C
  215. programs</para>
  216. <indexterm zone="ch-system-db libdb">
  217. <primary sortas="c-libdb">libdb</primary>
  218. </indexterm>
  219. </listitem>
  220. </varlistentry>
  221. <varlistentry id="libdb_cxx">
  222. <term><filename class="libraryfile">libdb_cxx.{so,a}</filename></term>
  223. <listitem>
  224. <para>Contains functions to manipulate database files from C++
  225. programs</para>
  226. <indexterm zone="ch-system-db libdb_cxx">
  227. <primary sortas="c-libdb_cxx">libdb_cxx</primary>
  228. </indexterm>
  229. </listitem>
  230. </varlistentry>
  231. </variablelist>
  232. </sect2>
  233. </sect1>