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