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