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 | <!ENTITY db-download-http "http://download-east.oracle.com/berkeley-db/db-&db-version;.tar.gz">
|
---|
8 | <!ENTITY db-download-ftp "&gentoo-ftp-repo;/db-&db-version;.tar.gz">
|
---|
9 | <!ENTITY db-md5sum "b0f1c777708cb8e9d37fb47e7ed3312d">
|
---|
10 | <!ENTITY db-size "9.2 MB">
|
---|
11 | <!ENTITY db-buildsize "94 MB (additional 100 MB to run parallel standard test suite)">
|
---|
12 | <!ENTITY db-time "1.7 SBU (builds all bindings, add an additional 145 SBU to run parallel standard test suite)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="db" xreflabel="Berkeley DB-&db-version;">
|
---|
16 | <?dbhtml filename="db.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>Berkeley DB-&db-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="db">
|
---|
26 | <primary sortas="a-Berkeley-DB">Berkeley DB</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to Berkeley DB</title>
|
---|
31 |
|
---|
32 | <para>The <application>Berkeley DB</application> package contains programs
|
---|
33 | and utilities used by many other applications for database related
|
---|
34 | functions. This package is also installed during LFS and may already exist
|
---|
35 | on your system. It is listed here in BLFS as well because you may need to
|
---|
36 | reinstall it if you need the additional language bindings or the RPC
|
---|
37 | server. If you do reinstall <application>Berkeley DB</application>, ensure
|
---|
38 | you use the &lfs-bdb-version; version used in the LFS book.</para>
|
---|
39 |
|
---|
40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
41 | <itemizedlist spacing="compact">
|
---|
42 | <listitem>
|
---|
43 | <para>Download (HTTP): <ulink url="&db-download-http;"/></para>
|
---|
44 | </listitem>
|
---|
45 | <listitem>
|
---|
46 | <para>Download (FTP): <ulink url="&db-download-ftp;"/></para>
|
---|
47 | </listitem>
|
---|
48 | <listitem>
|
---|
49 | <para>Download MD5 sum: &db-md5sum;</para>
|
---|
50 | </listitem>
|
---|
51 | <listitem>
|
---|
52 | <para>Download size: &db-size;</para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>Estimated disk space required: &db-buildsize;</para>
|
---|
56 | </listitem>
|
---|
57 | <listitem>
|
---|
58 | <para>Estimated build time: &db-time;</para>
|
---|
59 | </listitem>
|
---|
60 | </itemizedlist>
|
---|
61 |
|
---|
62 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
63 | <itemizedlist spacing="compact">
|
---|
64 | <listitem>
|
---|
65 | <para>Required patch: <ulink
|
---|
66 | url="http://www.oracle.com/technology/products/berkeley-db/db/update/&db-version;/patch.&db-version;.1"/></para>
|
---|
67 | </listitem>
|
---|
68 | <listitem>
|
---|
69 | <para>Required patch: <ulink
|
---|
70 | url="http://www.oracle.com/technology/products/berkeley-db/db/update/&db-version;/patch.&db-version;.2"/></para>
|
---|
71 | </listitem>
|
---|
72 | </itemizedlist>
|
---|
73 |
|
---|
74 | <bridgehead renderas="sect3">Berkeley DB Dependencies</bridgehead>
|
---|
75 |
|
---|
76 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
77 | <para role="optional"><xref linkend="tcl"/>,
|
---|
78 | <xref linkend="jdk"/>, and
|
---|
79 | <ulink url="http://www.gnu.org/software/sharutils/">sharutils</ulink>
|
---|
80 | (for the <command>uudecode</command> command)</para>
|
---|
81 |
|
---|
82 | <para condition="html" role="usernotes">User Notes:
|
---|
83 | <ulink url="&blfs-wiki;/db"/></para>
|
---|
84 |
|
---|
85 | </sect2>
|
---|
86 |
|
---|
87 | <sect2 role="testing">
|
---|
88 | <title>Testing Berkeley DB</title>
|
---|
89 |
|
---|
90 | <para>You may want to skip ahead to <xref linkend="bdb-installation"/>. The
|
---|
91 | test suite can take up to 150 SBUs and has a few bugs causing a report of
|
---|
92 | <quote>Regression tests failed</quote>. However, running the test suite is
|
---|
93 | a very exhaustive test of your hardware, perhaps pushing your machine
|
---|
94 | harder (especially disk I/O) than it will ever see during production use.
|
---|
95 | Note that you must have <application>Tcl</application> installed to run the
|
---|
96 | test suite.</para>
|
---|
97 |
|
---|
98 | <para>Build for the <application>Berkeley DB</application> test by running
|
---|
99 | the following commands:</para>
|
---|
100 |
|
---|
101 | <screen><userinput>patch -Np0 -i ../patch.&db-version;.1 &&
|
---|
102 | patch -Np0 -i ../patch.&db-version;.2 &&
|
---|
103 | cd build_unix &&
|
---|
104 | ../dist/configure --prefix=/usr \
|
---|
105 | --enable-test \
|
---|
106 | --enable-tcl \
|
---|
107 | --with-tcl=/usr/lib &&
|
---|
108 | make</userinput></screen>
|
---|
109 |
|
---|
110 | <para>To test the results, start <command>tclsh</command>:</para>
|
---|
111 |
|
---|
112 | <screen><userinput>tclsh</userinput></screen>
|
---|
113 |
|
---|
114 | <para>From the <command>tclsh</command> prompt (<prompt>% </prompt>),
|
---|
115 | run:</para>
|
---|
116 |
|
---|
117 | <screen><userinput>source ../test/test.tcl
|
---|
118 | run_parallel 5 run_std
|
---|
119 | exit</userinput></screen>
|
---|
120 |
|
---|
121 | <para>Clean up the source tree with the following command:</para>
|
---|
122 |
|
---|
123 | <screen><userinput>make realclean &&
|
---|
124 | cd ..</userinput></screen>
|
---|
125 |
|
---|
126 | </sect2>
|
---|
127 |
|
---|
128 | <sect2 role="installation" id="bdb-installation">
|
---|
129 | <title>Installation of Berkeley DB</title>
|
---|
130 |
|
---|
131 | <para>The installation commands below are identical to the commands used
|
---|
132 | in the LFS book. If you installed <application>Berkeley DB</application>
|
---|
133 | in LFS, and you don't add anything to the <command>configure</command>
|
---|
134 | script, you'll end up with exactly what you already have. The additional
|
---|
135 | parameters you can use are listed in the Command Explanations section
|
---|
136 | below. Install <application>Berkeley DB</application> by running the
|
---|
137 | following commands:</para>
|
---|
138 |
|
---|
139 | <screen><userinput>patch -Np0 -i ../patch.&db-version;.1 &&
|
---|
140 | patch -Np0 -i ../patch.&db-version;.2 &&
|
---|
141 | cd build_unix &&
|
---|
142 | ../dist/configure --prefix=/usr \
|
---|
143 | --enable-compat185 \
|
---|
144 | --enable-cxx &&
|
---|
145 | make</userinput></screen>
|
---|
146 |
|
---|
147 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
148 |
|
---|
149 | <screen role="root"><userinput>make docdir=/usr/share/doc/db-&db-version; install &&
|
---|
150 | chown -v root:root /usr/bin/db_* /usr/lib/libdb* /usr/include/db* &&
|
---|
151 | chown -v root:root /usr/bin/berkeley_db_svc &&
|
---|
152 | chown -v -R root:root /usr/share/doc/db-&db-version;</userinput></screen>
|
---|
153 |
|
---|
154 | </sect2>
|
---|
155 |
|
---|
156 | <sect2 role="commands">
|
---|
157 | <title>Command Explanations</title>
|
---|
158 |
|
---|
159 | <para><command>cd build_unix &&
|
---|
160 | ../dist/configure --prefix=/usr...</command>:
|
---|
161 | This replaces the normal <command>./configure</command> command, as
|
---|
162 | <application>Berkeley DB</application> comes with various
|
---|
163 | build directories for different platforms.</para>
|
---|
164 |
|
---|
165 | <para><parameter>--enable-compat185</parameter>: This switch enables
|
---|
166 | building the DB-1.85 compatibility API.</para>
|
---|
167 |
|
---|
168 | <para><parameter>--enable-cxx</parameter>: This switch enables building
|
---|
169 | C++ API libraries.</para>
|
---|
170 |
|
---|
171 | <para><parameter>--enable-tcl --with-tcl=/usr/lib</parameter>:
|
---|
172 | Enables <application>Tcl</application> support in DB and creates the
|
---|
173 | <filename class="libraryfile">libdb_tcl</filename> libraries.</para>
|
---|
174 |
|
---|
175 | <para><parameter>--enable-java</parameter>: Enables
|
---|
176 | <application>Java</application> support in DB and creates the
|
---|
177 | <filename class='libraryfile'>libdb_java</filename> libraries.</para>
|
---|
178 |
|
---|
179 | <para><parameter>--enable-rpc</parameter>: Enables building the
|
---|
180 | <application>Berkeley DB</application> RPC server.</para>
|
---|
181 |
|
---|
182 | <para><command>make docdir=/usr/share/doc/db-&db-version;
|
---|
183 | install</command>: This installs the documentation in
|
---|
184 | the correct location instead of
|
---|
185 | <filename class='directory'>/usr/docs</filename>.</para>
|
---|
186 |
|
---|
187 | <para><command>chown -v root:root /usr/bin/berkeley_db_svc</command>:
|
---|
188 | This command changes the ownership of the RPC server program. It is only
|
---|
189 | required if you passed <parameter>--enable-rpc</parameter> to the
|
---|
190 | <command>configure</command> script.</para>
|
---|
191 |
|
---|
192 | </sect2>
|
---|
193 |
|
---|
194 | <sect2 role="content">
|
---|
195 | <title>Contents</title>
|
---|
196 |
|
---|
197 | <para>Only the program and libraries not installed in LFS are listed here,
|
---|
198 | the others can be found at <ulink
|
---|
199 | url="&lfs-root;/chapter06/db.html#contents-db"/> as they were initially
|
---|
200 | installed during the building of LFS.</para>
|
---|
201 |
|
---|
202 | <segmentedlist>
|
---|
203 | <segtitle>Installed Program</segtitle>
|
---|
204 | <segtitle>Installed Libraries</segtitle>
|
---|
205 | <segtitle>Installed Directory</segtitle>
|
---|
206 |
|
---|
207 | <seglistitem>
|
---|
208 | <seg>berkeley_db_svc</seg>
|
---|
209 | <seg>libdb_java.{so,a} and libdb_tcl.{so,a}</seg>
|
---|
210 | <seg>/usr/share/doc/db-&db-version;</seg>
|
---|
211 | </seglistitem>
|
---|
212 | </segmentedlist>
|
---|
213 |
|
---|
214 | <variablelist>
|
---|
215 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
216 | <?dbfo list-presentation="list"?>
|
---|
217 | <?dbhtml list-presentation="table"?>
|
---|
218 |
|
---|
219 | <varlistentry id="berkeley_db_svc">
|
---|
220 | <term><command>berkeley_db_svc</command></term>
|
---|
221 | <listitem>
|
---|
222 | <para>is the <application>Berkeley DB</application>
|
---|
223 | RPC server.</para>
|
---|
224 | <indexterm zone="db berkeley_db_svc">
|
---|
225 | <primary sortas="b-berkeley_db_svc">berkeley_db_svc</primary>
|
---|
226 | </indexterm>
|
---|
227 | </listitem>
|
---|
228 | </varlistentry>
|
---|
229 |
|
---|
230 | <!-- These are left in so that if LFS ever dumps BDB, it is easy to
|
---|
231 | restore this information
|
---|
232 |
|
---|
233 | <varlistentry id="db_archive">
|
---|
234 | <term><command>db_archive</command></term>
|
---|
235 | <listitem>
|
---|
236 | <para>prints the pathnames of log files that are no longer in
|
---|
237 | use.</para>
|
---|
238 | <indexterm zone="db db_archive">
|
---|
239 | <primary sortas="b-db_archive">db_archive</primary>
|
---|
240 | </indexterm>
|
---|
241 | </listitem>
|
---|
242 | </varlistentry>
|
---|
243 |
|
---|
244 | <varlistentry id="db_checkpoint">
|
---|
245 | <term><command>db_checkpoint</command></term>
|
---|
246 | <listitem>
|
---|
247 | <para>is a daemon process used to monitor and checkpoint database
|
---|
248 | logs.</para>
|
---|
249 | <indexterm zone="db db_checkpoint">
|
---|
250 | <primary sortas="b-db_checkpoint">db_checkpoint</primary>
|
---|
251 | </indexterm>
|
---|
252 | </listitem>
|
---|
253 | </varlistentry>
|
---|
254 |
|
---|
255 | <varlistentry id="db_deadlock">
|
---|
256 | <term><command>db_deadlock</command></term>
|
---|
257 | <listitem>
|
---|
258 | <para>is used to abort lock requests when deadlocks are
|
---|
259 | detected.</para>
|
---|
260 | <indexterm zone="db db_deadlock">
|
---|
261 | <primary sortas="b-db_deadlock">db_deadlock</primary>
|
---|
262 | </indexterm>
|
---|
263 | </listitem>
|
---|
264 | </varlistentry>
|
---|
265 |
|
---|
266 | <varlistentry id="db_dump">
|
---|
267 | <term><command>db_dump</command></term>
|
---|
268 | <listitem>
|
---|
269 | <para>converts database files to a flat file format readable by
|
---|
270 | <command>db_load</command>.</para>
|
---|
271 | <indexterm zone="db db_dump">
|
---|
272 | <primary sortas="b-db_dump">db_dump</primary>
|
---|
273 | </indexterm>
|
---|
274 | </listitem>
|
---|
275 | </varlistentry>
|
---|
276 |
|
---|
277 | <varlistentry id="db_load">
|
---|
278 | <term><command>db_load</command></term>
|
---|
279 | <listitem>
|
---|
280 | <para>is used to create database files from flat files created with
|
---|
281 | <command>db_dump</command>.</para>
|
---|
282 | <indexterm zone="db db_load">
|
---|
283 | <primary sortas="b-db_load">db_load</primary>
|
---|
284 | </indexterm>
|
---|
285 | </listitem>
|
---|
286 | </varlistentry>
|
---|
287 |
|
---|
288 | <varlistentry id="db_printlog">
|
---|
289 | <term><command>db_printlog</command></term>
|
---|
290 | <listitem>
|
---|
291 | <para>converts database log files to human readable text.</para>
|
---|
292 | <indexterm zone="db db_printlog">
|
---|
293 | <primary sortas="b-db_printlog">db_printlog</primary>
|
---|
294 | </indexterm>
|
---|
295 | </listitem>
|
---|
296 | </varlistentry>
|
---|
297 |
|
---|
298 | <varlistentry id="db_recover">
|
---|
299 | <term><command>db_recover</command></term>
|
---|
300 | <listitem>
|
---|
301 | <para>is used to restore a database to a consistent state after a
|
---|
302 | failure.</para>
|
---|
303 | <indexterm zone="db db_recover">
|
---|
304 | <primary sortas="b-db_recover">db_recover</primary>
|
---|
305 | </indexterm>
|
---|
306 | </listitem>
|
---|
307 | </varlistentry>
|
---|
308 |
|
---|
309 | <varlistentry id="db_stat">
|
---|
310 | <term><command>db_stat</command></term>
|
---|
311 | <listitem>
|
---|
312 | <para>displays database environment statistics.</para>
|
---|
313 | <indexterm zone="db db_stat">
|
---|
314 | <primary sortas="b-db_stat">db_stat</primary>
|
---|
315 | </indexterm>
|
---|
316 | </listitem>
|
---|
317 | </varlistentry>
|
---|
318 |
|
---|
319 | <varlistentry id="db_upgrade">
|
---|
320 | <term><command>db_upgrade</command></term>
|
---|
321 | <listitem>
|
---|
322 | <para>is used to upgrade database files to a newer version of
|
---|
323 | <application>Berkeley DB</application>.</para>
|
---|
324 | <indexterm zone="db db_upgrade">
|
---|
325 | <primary sortas="b-db_upgrade">db_upgrade</primary>
|
---|
326 | </indexterm>
|
---|
327 | </listitem>
|
---|
328 | </varlistentry>
|
---|
329 |
|
---|
330 | <varlistentry id="db_verify">
|
---|
331 | <term><command>db_verify</command></term>
|
---|
332 | <listitem>
|
---|
333 | <para>is used to run consistency checks on database files.</para>
|
---|
334 | <indexterm zone="db db_verify">
|
---|
335 | <primary sortas="b-db_verify">db_verify</primary>
|
---|
336 | </indexterm>
|
---|
337 | </listitem>
|
---|
338 | </varlistentry>
|
---|
339 |
|
---|
340 | -->
|
---|
341 |
|
---|
342 | </variablelist>
|
---|
343 |
|
---|
344 | </sect2>
|
---|
345 |
|
---|
346 | </sect1>
|
---|