aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/db.xml
blob: 42a2b6c53c6d7c726c2caf57c8c514d814966a7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-db" role="wrap">
  <?dbhtml filename="db.html"?>

  <title>Berkeley DB-&db-version;</title>

  <indexterm zone="ch-system-db">
    <primary sortas="a-Berkeley-DB">Berkeley DB</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>The Berkeley DB package contains programs and utilities used by many
    other applications for database related functions.</para>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>1.2 SBU</seg>
        <seg>78 MB</seg>
      </seglistitem>
    </segmentedlist>

    <tip>
      <title>Other Installation Possibilities</title>

      <para>There are instructions to build this package in the BLFS book if you
      need to build the RPC server or additional language bindings. The
      additional language bindings will require additional packages to be
      installed. See <ulink url="&blfs-root;view/svn/server/databases.html#db"/>
      for suggested installation instructions.</para>

      <para>Also, GDBM <emphasis>could</emphasis> be used in place of Berkeley
      DB to satisfy Man-DB. However, since Berkeley DB is considered a core part
      of the LFS build, it will not be listed as a dependency for any package in
      the BLFS book. Likewise, many hours go into testing LFS with Berkeley DB
      installed, not with GDBM. If you fully understand the risks versus
      benefits of using GDBM and wish to use it anyway, see the BLFS
      instructions located at <ulink
      url="&blfs-root;view/svn/general/gdbm.html"/></para>
      
    </tip>

  </sect2>

  <sect2 role="installation">
    <title>Installation of Berkeley DB</title>

    <para>Prepare Berkeley DB for compilation:</para>

<screen><userinput>cd build_unix &amp;&amp;
../dist/configure --prefix=/usr --enable-compat185 --enable-cxx</userinput></screen>

    <variablelist>
      <title>The meaning of the configure options:</title>

      <varlistentry>
        <term><parameter>--enable-compat185</parameter></term>
        <listitem>
          <para>This option enables building Berkeley DB 1.85 compatibility
          API.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>--enable-cxx</parameter></term>
        <listitem>
          <para>This option enables building C++ API libraries.</para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>Compile the package:</para>

<screen><userinput>make</userinput></screen>

    <para>It is not possible to test the package meaningfully, because
    that would involve building TCL bindings. TCL bindings cannot be
    built properly now because TCL is linked against Glibc in
    <filename class="directory">/tools</filename>, not against Glibc in
    <filename class="directory">/usr</filename>.</para>

    <para>Install the package:</para>

<screen><userinput>make docdir=/usr/share/doc/db-&db-version; install</userinput></screen>

    <variablelist>
      <title>The meaning of the make parameter:</title>

      <varlistentry>
        <term><parameter>docdir=...</parameter></term>
        <listitem>
          <para>This variable specifies the correct place for the
          documentation.</para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>Fix the ownerships of the installed files:</para>

<screen><userinput>chown -v root:root /usr/bin/db_* \
    /usr/lib/libdb* /usr/include/db* &amp;&amp;
chown -Rv root:root /usr/share/doc/db-&db-version;</userinput></screen>

  </sect2>

  <sect2 id="contents-db" role="content">
    <title>Contents of Berkeley DB</title>

    <segmentedlist>
      <segtitle>Installed programs</segtitle>
      <segtitle>Installed libraries</segtitle>

      <seglistitem>
        <seg>db_archive, db_checkpoint, db_deadlock, db_dump, db_hotbackup,
        db_load, db_printlog, db_recover, db_stat, db_upgrade, and db_verify</seg>
        <seg>libdb.{so,ar}and libdb_cxx.r{o,ar}</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="db_archive">
        <term><command>db_archive</command></term>
        <listitem>
          <para>Prints the pathnames of log files that are no longer in use</para>
          <indexterm zone="ch-system-db db_archive">
            <primary sortas="b-db_archive">db_archive</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="db_checkpoint">
        <term><command>db_checkpoint</command></term>
        <listitem>
          <para>A daemon used to monitor and checkpoint database logs</para>
          <indexterm zone="ch-system-db db_checkpoint">
            <primary sortas="b-db_checkpoint">db_checkpoint</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="db_deadlock">
        <term><command>db_deadlock</command></term>
        <listitem>
          <para>A daemon used to abort lock requests when deadlocks are
          detected</para>
          <indexterm zone="ch-system-db db_deadlock">
            <primary sortas="b-db_deadlock">db_deadlock</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="db_dump">
        <term><command>db_dump</command></term>
        <listitem>
          <para>Converts database files to a plain-text file format readable
          by <command>db_load</command></para>
          <indexterm zone="ch-system-db db_dump">
            <primary sortas="b-db_dump">db_dump</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="db_hotbackup">
        <term><command>db_hotbackup</command></term>
        <listitem>
          <para>Creates <quote>hot backup</quote> or <quote>hot failover</quote>
          snapshots of Berkeley DB databases</para>
          <indexterm zone="ch-system-db db_hotbackup">
            <primary sortas="b-db_hotbackup">db_hotbackup</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="db_load">
        <term><command>db_load</command></term>
        <listitem>
          <para>Is used to create database files from plain-text files</para>
          <indexterm zone="ch-system-db db_load">
            <primary sortas="b-db_load">db_load</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="db_printlog">
        <term><command>db_printlog</command></term>
        <listitem>
          <para>Converts database log files to human readable text</para>
          <indexterm zone="ch-system-db db_printlog">
            <primary sortas="b-db_printlog">db_printlog</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="db_recover">
        <term><command>db_recover</command></term>
        <listitem>
          <para>Is used to restore a database to a consistent state after a
          failure</para>
          <indexterm zone="ch-system-db db_recover">
            <primary sortas="b-db_recover">db_recover</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="db_stat">
        <term><command>db_stat</command></term>
        <listitem>
          <para>Displays statistics for Berkeley databases</para>
          <indexterm zone="ch-system-db db_stat">
            <primary sortas="b-db_stat">db_stat</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="db_upgrade">
        <term><command>db_upgrade</command></term>
        <listitem>
          <para>Is used to upgrade database files to a newer version of
          Berkeley DB</para>
          <indexterm zone="ch-system-db db_upgrade">
            <primary sortas="b-db_upgrade">db_upgrade</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="db_verify">
        <term><command>db_verify</command></term>
        <listitem>
          <para>Is used to run consistency checks on database files</para>
          <indexterm zone="ch-system-db db_verify">
            <primary sortas="b-db_verify">db_verify</primary>
          </indexterm>
        </listitem>
      </varlistentry>


      <varlistentry id="libdb">
        <term><filename class="libraryfile">libdb.{so,a}</filename></term>
        <listitem>
          <para>Contains functions to manipulate database files from C
          programs</para>
          <indexterm zone="ch-system-db libdb">
            <primary sortas="c-libdb">libdb</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libdb_cxx">
        <term><filename class="libraryfile">libdb_cxx.{so,a}</filename></term>
        <listitem>
          <para>Contains functions to manipulate database files from C++
          programs</para>
          <indexterm zone="ch-system-db libdb_cxx">
            <primary sortas="c-libdb_cxx">libdb_cxx</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>