[08254fc] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[08254fc] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[0aeb696] | 6 |
|
---|
[cd2ef4a6] | 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">
|
---|
[4e7b1578] | 9 | <!ENTITY db-md5sum "d84dff288a19186b136b0daf7067ade3">
|
---|
| 10 | <!ENTITY db-size "7.9 MB">
|
---|
| 11 | <!ENTITY db-buildsize "66.7 MB (additional 100 MB to run parallel standard test suite)">
|
---|
| 12 | <!ENTITY db-time "1.4 SBU (builds all bindings, add an additional 145 SBU to run parallel standard test suite)">
|
---|
[08254fc] | 13 | ]>
|
---|
| 14 |
|
---|
[317034a] | 15 | <sect1 id="db" xreflabel="Berkeley DB-&db-version;">
|
---|
[b742c85] | 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
|
---|
[2a038b2] | 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
|
---|
[55fb7f56] | 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>
|
---|
[b742c85] | 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">Berkeley DB Dependencies</bridgehead>
|
---|
| 63 |
|
---|
| 64 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[2a038b2] | 65 | <para role="optional"><xref linkend="tcl"/>,
|
---|
| 66 | <xref linkend="jdk"/>, and
|
---|
[472ae882] | 67 | <ulink url="http://www.gnu.org/software/sharutils/">sharutils</ulink>
|
---|
| 68 | (for the <command>uudecode</command> command)</para>
|
---|
[b742c85] | 69 |
|
---|
[3cb0c57] | 70 | <para condition="html" role="usernotes">User Notes:
|
---|
| 71 | <ulink url="&blfs-wiki;/db"/></para>
|
---|
| 72 |
|
---|
[b742c85] | 73 | </sect2>
|
---|
| 74 |
|
---|
[ac3ee9f8] | 75 | <sect2 role="testing">
|
---|
| 76 | <title>Testing Berkeley DB</title>
|
---|
| 77 |
|
---|
[2a038b2] | 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>
|
---|
[ac3ee9f8] | 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 &&
|
---|
[4e7b1578] | 90 | ../dist/configure --prefix=/usr \
|
---|
| 91 | --enable-test \
|
---|
| 92 | --enable-tcl \
|
---|
| 93 | --with-tcl=/usr/lib &&
|
---|
[2a038b2] | 94 | make</userinput></screen>
|
---|
[ac3ee9f8] | 95 |
|
---|
[8d288fe8] | 96 | <para>To test the results, start <command>tclsh</command>:</para>
|
---|
[bccbdaea] | 97 |
|
---|
[8d288fe8] | 98 | <screen><userinput>tclsh</userinput></screen>
|
---|
| 99 |
|
---|
[4e7b1578] | 100 | <para>From the <command>tclsh</command> prompt (<prompt>% </prompt>),
|
---|
[2a038b2] | 101 | run:</para>
|
---|
[ac3ee9f8] | 102 |
|
---|
[4e7b1578] | 103 | <screen><userinput>source ../test/test.tcl
|
---|
| 104 | run_parallel 5 run_std
|
---|
| 105 | exit</userinput></screen>
|
---|
[ac3ee9f8] | 106 |
|
---|
[2a038b2] | 107 | <para>Clean up the source tree with the following command:</para>
|
---|
[ac3ee9f8] | 108 |
|
---|
[2c2f849] | 109 | <screen><userinput>make realclean &&
|
---|
[8d288fe8] | 110 | cd ..</userinput></screen>
|
---|
[2c2f849] | 111 |
|
---|
| 112 | </sect2>
|
---|
| 113 |
|
---|
[2a038b2] | 114 | <sect2 role="installation" id="bdb-installation">
|
---|
[2c2f849] | 115 | <title>Installation of Berkeley DB</title>
|
---|
| 116 |
|
---|
[4e7b1578] | 117 | <para>The installation commands below are identical to the commands used
|
---|
| 118 | in the LFS book. If you installed <application>Berkeley DB</application>
|
---|
| 119 | in LFS, and you don't add anything to the <command>configure</command>
|
---|
| 120 | script, you'll end up with exactly what you already have. The additional
|
---|
| 121 | parameters you can use are listed in the Command Explanations section
|
---|
| 122 | below. Install <application>Berkeley DB</application> by running the
|
---|
[2c2f849] | 123 | following commands:</para>
|
---|
| 124 |
|
---|
| 125 | <screen><userinput>cd build_unix &&
|
---|
| 126 | ../dist/configure --prefix=/usr \
|
---|
[2a038b2] | 127 | --enable-compat185 \
|
---|
| 128 | --enable-cxx &&
|
---|
| 129 | make</userinput></screen>
|
---|
[2c2f849] | 130 |
|
---|
| 131 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 132 |
|
---|
| 133 | <screen role="root"><userinput>make docdir=/usr/share/doc/db-&db-version; install &&
|
---|
[2a038b2] | 134 | chown -v root:root /usr/bin/db_* /usr/lib/libdb* /usr/include/db* &&
|
---|
| 135 | chown -v root:root /usr/bin/berkeley_db_svc &&
|
---|
| 136 | chown -v -R root:root /usr/share/doc/db-&db-version;</userinput></screen>
|
---|
[ac3ee9f8] | 137 |
|
---|
| 138 | </sect2>
|
---|
| 139 |
|
---|
[b742c85] | 140 | <sect2 role="commands">
|
---|
| 141 | <title>Command Explanations</title>
|
---|
| 142 |
|
---|
| 143 | <para><command>cd build_unix &&
|
---|
| 144 | ../dist/configure --prefix=/usr...</command>:
|
---|
| 145 | This replaces the normal <command>./configure</command> command, as
|
---|
| 146 | <application>Berkeley DB</application> comes with various
|
---|
| 147 | build directories for different platforms.</para>
|
---|
| 148 |
|
---|
| 149 | <para><parameter>--enable-compat185</parameter>: This switch enables
|
---|
[2a038b2] | 150 | building the DB-1.85 compatibility API.</para>
|
---|
[b742c85] | 151 |
|
---|
| 152 | <para><parameter>--enable-cxx</parameter>: This switch enables building
|
---|
| 153 | C++ API libraries.</para>
|
---|
| 154 |
|
---|
[ac3ee9f8] | 155 | <para><parameter>--enable-tcl --with-tcl=/usr/lib</parameter>:
|
---|
[b742c85] | 156 | Enables <application>Tcl</application> support in DB and creates the
|
---|
| 157 | <filename class="libraryfile">libdb_tcl</filename> libraries.</para>
|
---|
| 158 |
|
---|
[ac3ee9f8] | 159 | <para><parameter>--enable-java</parameter>: Enables
|
---|
[b742c85] | 160 | <application>Java</application> support in DB and creates the
|
---|
| 161 | <filename class='libraryfile'>libdb_java</filename> libraries.</para>
|
---|
| 162 |
|
---|
[ac3ee9f8] | 163 | <para><parameter>--enable-rpc</parameter>: Enables building the
|
---|
[b742c85] | 164 | <application>Berkeley DB</application> RPC server.</para>
|
---|
| 165 |
|
---|
[ac3ee9f8] | 166 | <para><command>make docdir=/usr/share/doc/db-&db-version;
|
---|
| 167 | install</command>: This installs the documentation in
|
---|
[2a038b2] | 168 | the correct location instead of
|
---|
| 169 | <filename class='directory'>/usr/docs</filename>.</para>
|
---|
[ac3ee9f8] | 170 |
|
---|
[2a038b2] | 171 | <para><command>chown -v root:root /usr/bin/berkeley_db_svc</command>:
|
---|
| 172 | This command changes the ownership of the RPC server program. It is only
|
---|
| 173 | required if you passed <parameter>--enable-rpc</parameter> to the
|
---|
| 174 | <command>configure</command> script.</para>
|
---|
[0635d22] | 175 |
|
---|
[b742c85] | 176 | </sect2>
|
---|
| 177 |
|
---|
| 178 | <sect2 role="content">
|
---|
| 179 | <title>Contents</title>
|
---|
| 180 |
|
---|
[2a038b2] | 181 | <para>Only the program and libraries not installed in LFS are listed here,
|
---|
| 182 | the others can be found at <ulink
|
---|
| 183 | url="&lfs-root;/chapter06/db.html#contents-db"/> as they were initially
|
---|
| 184 | installed during the building of LFS.</para>
|
---|
| 185 |
|
---|
[b742c85] | 186 | <segmentedlist>
|
---|
[2a038b2] | 187 | <segtitle>Installed Program</segtitle>
|
---|
[b742c85] | 188 | <segtitle>Installed Libraries</segtitle>
|
---|
| 189 | <segtitle>Installed Directory</segtitle>
|
---|
| 190 |
|
---|
| 191 | <seglistitem>
|
---|
[2a038b2] | 192 | <seg>berkeley_db_svc</seg>
|
---|
[3cb0c57] | 193 | <seg>libdb_java.{so,a} and libdb_tcl.{so,a}</seg>
|
---|
[b742c85] | 194 | <seg>/usr/share/doc/db-&db-version;</seg>
|
---|
| 195 | </seglistitem>
|
---|
| 196 | </segmentedlist>
|
---|
| 197 |
|
---|
| 198 | <variablelist>
|
---|
| 199 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 200 | <?dbfo list-presentation="list"?>
|
---|
| 201 | <?dbhtml list-presentation="table"?>
|
---|
| 202 |
|
---|
| 203 | <varlistentry id="berkeley_db_svc">
|
---|
| 204 | <term><command>berkeley_db_svc</command></term>
|
---|
| 205 | <listitem>
|
---|
| 206 | <para>is the <application>Berkeley DB</application>
|
---|
| 207 | RPC server.</para>
|
---|
| 208 | <indexterm zone="db berkeley_db_svc">
|
---|
| 209 | <primary sortas="b-berkeley_db_svc">berkeley_db_svc</primary>
|
---|
| 210 | </indexterm>
|
---|
| 211 | </listitem>
|
---|
| 212 | </varlistentry>
|
---|
| 213 |
|
---|
[2a038b2] | 214 | <!-- These are left in so that if LFS ever dumps BDB, it is easy to
|
---|
| 215 | restore this information
|
---|
| 216 |
|
---|
[b742c85] | 217 | <varlistentry id="db_archive">
|
---|
| 218 | <term><command>db_archive</command></term>
|
---|
| 219 | <listitem>
|
---|
| 220 | <para>prints the pathnames of log files that are no longer in
|
---|
| 221 | use.</para>
|
---|
| 222 | <indexterm zone="db db_archive">
|
---|
| 223 | <primary sortas="b-db_archive">db_archive</primary>
|
---|
| 224 | </indexterm>
|
---|
| 225 | </listitem>
|
---|
| 226 | </varlistentry>
|
---|
| 227 |
|
---|
| 228 | <varlistentry id="db_checkpoint">
|
---|
| 229 | <term><command>db_checkpoint</command></term>
|
---|
| 230 | <listitem>
|
---|
| 231 | <para>is a daemon process used to monitor and checkpoint database
|
---|
| 232 | logs.</para>
|
---|
| 233 | <indexterm zone="db db_checkpoint">
|
---|
| 234 | <primary sortas="b-db_checkpoint">db_checkpoint</primary>
|
---|
| 235 | </indexterm>
|
---|
| 236 | </listitem>
|
---|
| 237 | </varlistentry>
|
---|
| 238 |
|
---|
| 239 | <varlistentry id="db_deadlock">
|
---|
| 240 | <term><command>db_deadlock</command></term>
|
---|
| 241 | <listitem>
|
---|
| 242 | <para>is used to abort lock requests when deadlocks are
|
---|
| 243 | detected.</para>
|
---|
| 244 | <indexterm zone="db db_deadlock">
|
---|
| 245 | <primary sortas="b-db_deadlock">db_deadlock</primary>
|
---|
| 246 | </indexterm>
|
---|
| 247 | </listitem>
|
---|
| 248 | </varlistentry>
|
---|
| 249 |
|
---|
| 250 | <varlistentry id="db_dump">
|
---|
| 251 | <term><command>db_dump</command></term>
|
---|
| 252 | <listitem>
|
---|
| 253 | <para>converts database files to a flat file format readable by
|
---|
| 254 | <command>db_load</command>.</para>
|
---|
| 255 | <indexterm zone="db db_dump">
|
---|
| 256 | <primary sortas="b-db_dump">db_dump</primary>
|
---|
| 257 | </indexterm>
|
---|
| 258 | </listitem>
|
---|
| 259 | </varlistentry>
|
---|
| 260 |
|
---|
| 261 | <varlistentry id="db_load">
|
---|
| 262 | <term><command>db_load</command></term>
|
---|
| 263 | <listitem>
|
---|
| 264 | <para>is used to create database files from flat files created with
|
---|
| 265 | <command>db_dump</command>.</para>
|
---|
| 266 | <indexterm zone="db db_load">
|
---|
| 267 | <primary sortas="b-db_load">db_load</primary>
|
---|
| 268 | </indexterm>
|
---|
| 269 | </listitem>
|
---|
| 270 | </varlistentry>
|
---|
| 271 |
|
---|
| 272 | <varlistentry id="db_printlog">
|
---|
| 273 | <term><command>db_printlog</command></term>
|
---|
| 274 | <listitem>
|
---|
| 275 | <para>converts database log files to human readable text.</para>
|
---|
| 276 | <indexterm zone="db db_printlog">
|
---|
| 277 | <primary sortas="b-db_printlog">db_printlog</primary>
|
---|
| 278 | </indexterm>
|
---|
| 279 | </listitem>
|
---|
| 280 | </varlistentry>
|
---|
| 281 |
|
---|
| 282 | <varlistentry id="db_recover">
|
---|
| 283 | <term><command>db_recover</command></term>
|
---|
| 284 | <listitem>
|
---|
| 285 | <para>is used to restore a database to a consistent state after a
|
---|
| 286 | failure.</para>
|
---|
| 287 | <indexterm zone="db db_recover">
|
---|
| 288 | <primary sortas="b-db_recover">db_recover</primary>
|
---|
| 289 | </indexterm>
|
---|
| 290 | </listitem>
|
---|
| 291 | </varlistentry>
|
---|
| 292 |
|
---|
| 293 | <varlistentry id="db_stat">
|
---|
| 294 | <term><command>db_stat</command></term>
|
---|
| 295 | <listitem>
|
---|
| 296 | <para>displays database environment statistics.</para>
|
---|
| 297 | <indexterm zone="db db_stat">
|
---|
| 298 | <primary sortas="b-db_stat">db_stat</primary>
|
---|
| 299 | </indexterm>
|
---|
| 300 | </listitem>
|
---|
| 301 | </varlistentry>
|
---|
| 302 |
|
---|
| 303 | <varlistentry id="db_upgrade">
|
---|
| 304 | <term><command>db_upgrade</command></term>
|
---|
| 305 | <listitem>
|
---|
| 306 | <para>is used to upgrade database files to a newer version of
|
---|
| 307 | <application>Berkeley DB</application>.</para>
|
---|
| 308 | <indexterm zone="db db_upgrade">
|
---|
| 309 | <primary sortas="b-db_upgrade">db_upgrade</primary>
|
---|
| 310 | </indexterm>
|
---|
| 311 | </listitem>
|
---|
| 312 | </varlistentry>
|
---|
| 313 |
|
---|
| 314 | <varlistentry id="db_verify">
|
---|
| 315 | <term><command>db_verify</command></term>
|
---|
| 316 | <listitem>
|
---|
| 317 | <para>is used to run consistency checks on database files.</para>
|
---|
| 318 | <indexterm zone="db db_verify">
|
---|
| 319 | <primary sortas="b-db_verify">db_verify</primary>
|
---|
| 320 | </indexterm>
|
---|
| 321 | </listitem>
|
---|
| 322 | </varlistentry>
|
---|
| 323 |
|
---|
[2a038b2] | 324 | -->
|
---|
| 325 |
|
---|
[b742c85] | 326 | </variablelist>
|
---|
| 327 |
|
---|
| 328 | </sect2>
|
---|
[f45b1953] | 329 |
|
---|
| 330 | </sect1>
|
---|