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