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">
8 <sect1 id="ch-system-db" role="wrap">
9 <?dbhtml filename="db.html"?>
11 <sect1info condition="script">
12 <productname>db</productname>
13 <productnumber>&db-version;</productnumber>
14 <address>&db-url;</address>
17 <title>Berkeley DB-&db-version;</title>
19 <indexterm zone="ch-system-db">
20 <primary sortas="a-Berkeley-DB">Berkeley DB</primary>
23 <sect2 role="package">
26 <para>The Berkeley DB package contains programs and utilities used by many
27 other applications for database related functions.</para>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
34 <seg>&db-ch6-sbu;</seg>
35 <seg>&db-ch6-du;</seg>
40 <title>Other Installation Possibilities</title>
42 <para>There are instructions to build this package in the BLFS book if you
43 need to build the RPC server or additional language bindings. The
44 additional language bindings will require additional packages to be
45 installed. See <ulink url="&blfs-book;server/databases.html#db"/>
46 for suggested installation instructions.</para>
48 <para>Also, GDBM <emphasis>could</emphasis> be used in place of Berkeley
49 DB to satisfy Man-DB. However, since Berkeley DB is considered a core part
50 of the LFS build, it will not be listed as a dependency for any package in
51 the BLFS book. Likewise, many hours go into testing LFS with Berkeley DB
52 installed, not with GDBM. If you fully understand the risks versus
53 benefits of using GDBM and wish to use it anyway, see the BLFS
54 instructions located at <ulink
55 url="&blfs-book;general/gdbm.html"/></para>
61 <sect2 role="installation">
62 <title>Installation of Berkeley DB</title>
64 <para>Apply an upstream patch so that replication clients can open a
67 <screen><userinput remap="pre">patch -Np1 -i ../&db-fixes-patch;</userinput></screen>
69 <para>Prepare Berkeley DB for compilation:</para>
71 <screen><userinput remap="configure">cd build_unix
72 ../dist/configure --prefix=/usr --enable-compat185 --enable-cxx</userinput></screen>
75 <title>The meaning of the configure options:</title>
78 <term><parameter>--enable-compat185</parameter></term>
80 <para>This option enables building Berkeley DB 1.85 compatibility
86 <term><parameter>--enable-cxx</parameter></term>
88 <para>This option enables building C++ API libraries.</para>
94 <para>Compile the package:</para>
96 <screen><userinput remap="make">make</userinput></screen>
98 <para>It is not possible to test the package meaningfully, because
99 that would involve building Tcl bindings. Tcl bindings cannot be
100 built properly now because Tcl is linked against Glibc in
101 <filename class="directory">/tools</filename>, not against Glibc in
102 <filename class="directory">/usr</filename>.</para>
104 <para>Install the package:</para>
106 <screen><userinput remap="install">make docdir=/usr/share/doc/db-&db-version; install</userinput></screen>
109 <title>The meaning of the make parameter:</title>
112 <term><parameter>docdir=...</parameter></term>
114 <para>This variable specifies the correct place for the
115 documentation.</para>
121 <para>Fix the ownership of the installed documentation:</para>
123 <screen><userinput remap="install">chown -Rv root:root /usr/share/doc/db-&db-version;</userinput></screen>
127 <sect2 id="contents-db" role="content">
128 <title>Contents of Berkeley DB</title>
131 <segtitle>Installed programs</segtitle>
132 <segtitle>Installed libraries</segtitle>
135 <seg>db_archive, db_checkpoint, db_codegen, db_deadlock, db_dump,
136 db_hotbackup, db_load, db_printlog, db_recover, db_stat, db_upgrade, and
138 <seg>libdb.{a,so}and libdb_cxx.{a,so}</seg>
143 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
144 <?dbfo list-presentation="list"?>
145 <?dbhtml list-presentation="table"?>
147 <varlistentry id="db_archive">
148 <term><command>db_archive</command></term>
150 <para>Prints the pathnames of log files that are no longer in use</para>
151 <indexterm zone="ch-system-db db_archive">
152 <primary sortas="b-db_archive">db_archive</primary>
157 <varlistentry id="db_checkpoint">
158 <term><command>db_checkpoint</command></term>
160 <para>A daemon used to monitor and checkpoint database logs</para>
161 <indexterm zone="ch-system-db db_checkpoint">
162 <primary sortas="b-db_checkpoint">db_checkpoint</primary>
167 <varlistentry id="db_codegen">
168 <term><command>db_codegen</command></term>
170 <para>Generates application code to create and configure Berkeley DB
171 database environments and databases based on a simple description
172 language, and writes it to one or more output files</para>
173 <indexterm zone="ch-system-db db_codegen">
174 <primary sortas="b-db_codegen">db_codegen</primary>
179 <varlistentry id="db_deadlock">
180 <term><command>db_deadlock</command></term>
182 <para>A daemon used to abort lock requests when deadlocks are
184 <indexterm zone="ch-system-db db_deadlock">
185 <primary sortas="b-db_deadlock">db_deadlock</primary>
190 <varlistentry id="db_dump">
191 <term><command>db_dump</command></term>
193 <para>Converts database files to a plain-text file format readable
194 by <command>db_load</command></para>
195 <indexterm zone="ch-system-db db_dump">
196 <primary sortas="b-db_dump">db_dump</primary>
201 <varlistentry id="db_hotbackup">
202 <term><command>db_hotbackup</command></term>
204 <para>Creates <quote>hot backup</quote> or <quote>hot failover</quote>
205 snapshots of Berkeley DB databases</para>
206 <indexterm zone="ch-system-db db_hotbackup">
207 <primary sortas="b-db_hotbackup">db_hotbackup</primary>
212 <varlistentry id="db_load">
213 <term><command>db_load</command></term>
215 <para>Is used to create database files from plain-text files</para>
216 <indexterm zone="ch-system-db db_load">
217 <primary sortas="b-db_load">db_load</primary>
222 <varlistentry id="db_printlog">
223 <term><command>db_printlog</command></term>
225 <para>Converts database log files to human readable text</para>
226 <indexterm zone="ch-system-db db_printlog">
227 <primary sortas="b-db_printlog">db_printlog</primary>
232 <varlistentry id="db_recover">
233 <term><command>db_recover</command></term>
235 <para>Is used to restore a database to a consistent state after a
237 <indexterm zone="ch-system-db db_recover">
238 <primary sortas="b-db_recover">db_recover</primary>
243 <varlistentry id="db_stat">
244 <term><command>db_stat</command></term>
246 <para>Displays statistics for Berkeley databases</para>
247 <indexterm zone="ch-system-db db_stat">
248 <primary sortas="b-db_stat">db_stat</primary>
253 <varlistentry id="db_upgrade">
254 <term><command>db_upgrade</command></term>
256 <para>Is used to upgrade database files to a newer version of
258 <indexterm zone="ch-system-db db_upgrade">
259 <primary sortas="b-db_upgrade">db_upgrade</primary>
264 <varlistentry id="db_verify">
265 <term><command>db_verify</command></term>
267 <para>Is used to run consistency checks on database files</para>
268 <indexterm zone="ch-system-db db_verify">
269 <primary sortas="b-db_verify">db_verify</primary>
275 <varlistentry id="libdb">
276 <term><filename class="libraryfile">libdb.{a,so}</filename></term>
278 <para>Contains functions to manipulate database files from C
280 <indexterm zone="ch-system-db libdb">
281 <primary sortas="c-libdb">libdb</primary>
286 <varlistentry id="libdb_cxx">
287 <term><filename class="libraryfile">libdb_cxx.{a,so}</filename></term>
289 <para>Contains functions to manipulate database files from C++
291 <indexterm zone="ch-system-db libdb_cxx">
292 <primary sortas="c-libdb_cxx">libdb_cxx</primary>