[08254fc] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[08254fc] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[0aeb696] | 6 |
|
---|
[8dbe2b6] | 7 | <!ENTITY db-download-http "http://download-east.oracle.com/berkeley-db/db-&db-version;.tar.gz">
|
---|
[8f9c757e] | 8 | <!ENTITY db-download-ftp "&gentoo-ftp-repo;/db-&db-version;.tar.gz">
|
---|
[d8069d7] | 9 | <!ENTITY db-md5sum "88466dd6c13d5d8cddb406be8a1d4d92">
|
---|
| 10 | <!ENTITY db-size "33 MB">
|
---|
| 11 | <!ENTITY db-buildsize "181 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 |
|
---|
[de7f20e] | 32 | <para>The <application>Berkeley DB</application> package contains programs
|
---|
| 33 | and utilities used by many other applications for database related
|
---|
| 34 | functions.</para>
|
---|
[b742c85] | 35 |
|
---|
[d8069d7] | 36 | &lfs70_checked;
|
---|
| 37 |
|
---|
[b742c85] | 38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem>
|
---|
| 41 | <para>Download (HTTP): <ulink url="&db-download-http;"/></para>
|
---|
| 42 | </listitem>
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>Download (FTP): <ulink url="&db-download-ftp;"/></para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>Download MD5 sum: &db-md5sum;</para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download size: &db-size;</para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Estimated disk space required: &db-buildsize;</para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Estimated build time: &db-time;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | </itemizedlist>
|
---|
| 59 |
|
---|
| 60 | <bridgehead renderas="sect3">Berkeley DB Dependencies</bridgehead>
|
---|
| 61 |
|
---|
| 62 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[d8069d7] | 63 | <para role="optional">
|
---|
| 64 | <xref linkend="tcl"/>,
|
---|
| 65 | <xref linkend="icedtea6"/> or <xref linkend="jdk"/>, and
|
---|
| 66 | <xref linkend='sharutils'/> (for the <command>uudecode</command> command)
|
---|
| 67 | </para>
|
---|
[b742c85] | 68 |
|
---|
[3cb0c57] | 69 | <para condition="html" role="usernotes">User Notes:
|
---|
| 70 | <ulink url="&blfs-wiki;/db"/></para>
|
---|
| 71 |
|
---|
[b742c85] | 72 | </sect2>
|
---|
| 73 |
|
---|
[ac3ee9f8] | 74 | <sect2 role="testing">
|
---|
| 75 | <title>Testing Berkeley DB</title>
|
---|
| 76 |
|
---|
[2a038b2] | 77 | <para>You may want to skip ahead to <xref linkend="bdb-installation"/>. The
|
---|
| 78 | test suite can take up to 150 SBUs and has a few bugs causing a report of
|
---|
| 79 | <quote>Regression tests failed</quote>. However, running the test suite is
|
---|
| 80 | a very exhaustive test of your hardware, perhaps pushing your machine
|
---|
| 81 | harder (especially disk I/O) than it will ever see during production use.
|
---|
| 82 | Note that you must have <application>Tcl</application> installed to run the
|
---|
| 83 | test suite.</para>
|
---|
[ac3ee9f8] | 84 |
|
---|
[8f9c757e] | 85 | <para>Build for the <application>Berkeley DB</application> test by running
|
---|
| 86 | the following commands:</para>
|
---|
[ac3ee9f8] | 87 |
|
---|
[0fc1dd0] | 88 | <screen><userinput>cd build_unix &&
|
---|
[8f9c757e] | 89 | ../dist/configure --prefix=/usr \
|
---|
[4e7b1578] | 90 | --enable-test \
|
---|
| 91 | --enable-tcl \
|
---|
[1ae6204] | 92 | --enable-dbm \
|
---|
[4e7b1578] | 93 | --with-tcl=/usr/lib &&
|
---|
[2a038b2] | 94 | make</userinput></screen>
|
---|
[ac3ee9f8] | 95 |
|
---|
[8f9c757e] | 96 | <para>To test the results, start <command>tclsh</command>:</para>
|
---|
[bccbdaea] | 97 |
|
---|
[8f9c757e] | 98 | <screen><userinput>tclsh</userinput></screen>
|
---|
| 99 |
|
---|
| 100 | <para>From the <command>tclsh</command> prompt (<prompt>% </prompt>),
|
---|
| 101 | run:</para>
|
---|
| 102 |
|
---|
[d8069d7] | 103 | <screen><userinput>source ../test/tcl/test.tcl
|
---|
[8f9c757e] | 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 |
|
---|
[d8069d7] | 112 | <note><para>Test127.f and Repmgr026.c are known to fail.</para></note>
|
---|
| 113 |
|
---|
| 114 | <para>There are additional testing suites in the <filename
|
---|
| 115 | class='directory'>test/c</filename> and <filename
|
---|
| 116 | class='directory'>test/cxx</filename> directories. See the
|
---|
| 117 | <filename>README</filename> in each directory for instructions on how to
|
---|
| 118 | run the tests.</para>
|
---|
| 119 |
|
---|
[2c2f849] | 120 | </sect2>
|
---|
| 121 |
|
---|
[2a038b2] | 122 | <sect2 role="installation" id="bdb-installation">
|
---|
[2c2f849] | 123 | <title>Installation of Berkeley DB</title>
|
---|
| 124 |
|
---|
[f53134c] | 125 | <note>
|
---|
| 126 | <para>If you plan on installing <application>Berkeley DB</application>
|
---|
| 127 | with Java support, you should check the system for certain versions
|
---|
| 128 | of <xref linkend="jdk"/> and <xref linkend="gmime"/>. Specifically, if
|
---|
| 129 | <application>JDK</application>-6 Update X and the
|
---|
| 130 | <command>uudecode</command> program from the
|
---|
| 131 | <application>GMime</application> program is on the system, the build will
|
---|
| 132 | fail (unless you run the modified <command>./configure</command> command
|
---|
| 133 | shown below). You can run two commands (<command>javac -version</command>
|
---|
[8f9c757e] | 134 | and <command>uudecode --version</command>) to determine what versions are
|
---|
[f53134c] | 135 | installed. You can also download and run a shell script from
|
---|
| 136 | <ulink url="&files-anduin;/jdk-uudecode-check.sh"/> that will alert
|
---|
| 137 | you to a non-working condition. If the identified programs exist on the
|
---|
| 138 | system, you must modify the
|
---|
[8f9c757e] | 139 | <command>./configure</command> command as shown below.</para>
|
---|
[f53134c] | 140 |
|
---|
[8f9c757e] | 141 | <screen><userinput>uudecode="no" ../dist/configure --(use the parameters shown below)</userinput></screen>
|
---|
| 142 | </note>
|
---|
[f53134c] | 143 |
|
---|
| 144 | <para>Install <application>Berkeley DB</application> by running the
|
---|
[2c2f849] | 145 | following commands:</para>
|
---|
| 146 |
|
---|
[ffc584a3] | 147 | <screen><userinput>cd build_unix &&
|
---|
[8f9c757e] | 148 | ../dist/configure --prefix=/usr \
|
---|
[2a038b2] | 149 | --enable-compat185 \
|
---|
[94cebca] | 150 | --enable-dbm \
|
---|
[8f9c757e] | 151 | --enable-cxx &&
|
---|
[2a038b2] | 152 | make</userinput></screen>
|
---|
[2c2f849] | 153 |
|
---|
| 154 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 155 |
|
---|
| 156 | <screen role="root"><userinput>make docdir=/usr/share/doc/db-&db-version; install &&
|
---|
[35a18d26] | 157 | chown -v -R root:root \
|
---|
| 158 | /usr/bin/db_* \
|
---|
[8f9c757e] | 159 | /usr/include/db{,_185,_cxx}.h \
|
---|
[d8069d7] | 160 | /usr/lib/libdb*.{so,a,la} \
|
---|
[35a18d26] | 161 | /usr/share/doc/db-&db-version;</userinput></screen>
|
---|
[ac3ee9f8] | 162 |
|
---|
| 163 | </sect2>
|
---|
| 164 |
|
---|
[b742c85] | 165 | <sect2 role="commands">
|
---|
| 166 | <title>Command Explanations</title>
|
---|
| 167 |
|
---|
| 168 | <para><command>cd build_unix &&
|
---|
[8f9c757e] | 169 | ../dist/configure --prefix=/usr...</command>:
|
---|
[b742c85] | 170 | This replaces the normal <command>./configure</command> command, as
|
---|
| 171 | <application>Berkeley DB</application> comes with various
|
---|
[8f9c757e] | 172 | build directories for different platforms.</para>
|
---|
[b742c85] | 173 |
|
---|
| 174 | <para><parameter>--enable-compat185</parameter>: This switch enables
|
---|
[2a038b2] | 175 | building the DB-1.85 compatibility API.</para>
|
---|
[b742c85] | 176 |
|
---|
| 177 | <para><parameter>--enable-cxx</parameter>: This switch enables building
|
---|
| 178 | C++ API libraries.</para>
|
---|
| 179 |
|
---|
[ac3ee9f8] | 180 | <para><parameter>--enable-tcl --with-tcl=/usr/lib</parameter>:
|
---|
[b742c85] | 181 | Enables <application>Tcl</application> support in DB and creates the
|
---|
| 182 | <filename class="libraryfile">libdb_tcl</filename> libraries.</para>
|
---|
| 183 |
|
---|
[1ae6204] | 184 | <para><parameter>--enable-dbm</parameter>: Enables legacy interface support
|
---|
| 185 | support needed by some older packages.</para>
|
---|
| 186 |
|
---|
[ac3ee9f8] | 187 | <para><parameter>--enable-java</parameter>: Enables
|
---|
[b742c85] | 188 | <application>Java</application> support in DB and creates the
|
---|
| 189 | <filename class='libraryfile'>libdb_java</filename> libraries.</para>
|
---|
| 190 |
|
---|
[ac3ee9f8] | 191 | <para><command>make docdir=/usr/share/doc/db-&db-version;
|
---|
| 192 | install</command>: This installs the documentation in
|
---|
[35a18d26] | 193 | the standard location instead of
|
---|
[2a038b2] | 194 | <filename class='directory'>/usr/docs</filename>.</para>
|
---|
[ac3ee9f8] | 195 |
|
---|
[8f9c757e] | 196 | <para><command>chown -v -R root:root ...</command>:This command changes
|
---|
[35a18d26] | 197 | the ownership of various installed files from the uid:gid of the
|
---|
| 198 | builder to root:root.</para>
|
---|
[0635d22] | 199 |
|
---|
[b742c85] | 200 | </sect2>
|
---|
| 201 |
|
---|
| 202 | <sect2 role="content">
|
---|
| 203 | <title>Contents</title>
|
---|
| 204 |
|
---|
| 205 | <segmentedlist>
|
---|
[de7f20e] | 206 | <segtitle>Installed Programs</segtitle>
|
---|
[b742c85] | 207 | <segtitle>Installed Libraries</segtitle>
|
---|
| 208 | <segtitle>Installed Directory</segtitle>
|
---|
| 209 |
|
---|
| 210 | <seglistitem>
|
---|
[bff0fc4] | 211 | <seg>db_archive, db_checkpoint, db_deadlock, db_dump,
|
---|
[8f9c757e] | 212 | db_load, db_printlog, db_recover, db_stat, db_upgrade, db_verify</seg>
|
---|
| 213 | <seg>libdb.{so,a}, libdb_cxx.{so,a}, libdb_java.{so,a},
|
---|
| 214 | libdb_tcl.{so,a} and db.jar</seg>
|
---|
[b742c85] | 215 | <seg>/usr/share/doc/db-&db-version;</seg>
|
---|
| 216 | </seglistitem>
|
---|
| 217 | </segmentedlist>
|
---|
| 218 |
|
---|
| 219 | <variablelist>
|
---|
| 220 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 221 | <?dbfo list-presentation="list"?>
|
---|
| 222 | <?dbhtml list-presentation="table"?>
|
---|
| 223 |
|
---|
| 224 | <varlistentry id="db_archive">
|
---|
| 225 | <term><command>db_archive</command></term>
|
---|
| 226 | <listitem>
|
---|
| 227 | <para>prints the pathnames of log files that are no longer in
|
---|
| 228 | use.</para>
|
---|
| 229 | <indexterm zone="db db_archive">
|
---|
| 230 | <primary sortas="b-db_archive">db_archive</primary>
|
---|
| 231 | </indexterm>
|
---|
| 232 | </listitem>
|
---|
| 233 | </varlistentry>
|
---|
| 234 |
|
---|
| 235 | <varlistentry id="db_checkpoint">
|
---|
| 236 | <term><command>db_checkpoint</command></term>
|
---|
| 237 | <listitem>
|
---|
| 238 | <para>is a daemon process used to monitor and checkpoint database
|
---|
| 239 | logs.</para>
|
---|
| 240 | <indexterm zone="db db_checkpoint">
|
---|
| 241 | <primary sortas="b-db_checkpoint">db_checkpoint</primary>
|
---|
| 242 | </indexterm>
|
---|
| 243 | </listitem>
|
---|
| 244 | </varlistentry>
|
---|
| 245 |
|
---|
| 246 | <varlistentry id="db_deadlock">
|
---|
| 247 | <term><command>db_deadlock</command></term>
|
---|
| 248 | <listitem>
|
---|
| 249 | <para>is used to abort lock requests when deadlocks are
|
---|
| 250 | detected.</para>
|
---|
| 251 | <indexterm zone="db db_deadlock">
|
---|
| 252 | <primary sortas="b-db_deadlock">db_deadlock</primary>
|
---|
| 253 | </indexterm>
|
---|
| 254 | </listitem>
|
---|
| 255 | </varlistentry>
|
---|
| 256 |
|
---|
| 257 | <varlistentry id="db_dump">
|
---|
| 258 | <term><command>db_dump</command></term>
|
---|
| 259 | <listitem>
|
---|
| 260 | <para>converts database files to a flat file format readable by
|
---|
| 261 | <command>db_load</command>.</para>
|
---|
| 262 | <indexterm zone="db db_dump">
|
---|
| 263 | <primary sortas="b-db_dump">db_dump</primary>
|
---|
| 264 | </indexterm>
|
---|
| 265 | </listitem>
|
---|
| 266 | </varlistentry>
|
---|
| 267 |
|
---|
| 268 | <varlistentry id="db_load">
|
---|
| 269 | <term><command>db_load</command></term>
|
---|
| 270 | <listitem>
|
---|
| 271 | <para>is used to create database files from flat files created with
|
---|
| 272 | <command>db_dump</command>.</para>
|
---|
| 273 | <indexterm zone="db db_load">
|
---|
| 274 | <primary sortas="b-db_load">db_load</primary>
|
---|
| 275 | </indexterm>
|
---|
| 276 | </listitem>
|
---|
| 277 | </varlistentry>
|
---|
| 278 |
|
---|
| 279 | <varlistentry id="db_printlog">
|
---|
| 280 | <term><command>db_printlog</command></term>
|
---|
| 281 | <listitem>
|
---|
| 282 | <para>converts database log files to human readable text.</para>
|
---|
| 283 | <indexterm zone="db db_printlog">
|
---|
| 284 | <primary sortas="b-db_printlog">db_printlog</primary>
|
---|
| 285 | </indexterm>
|
---|
| 286 | </listitem>
|
---|
| 287 | </varlistentry>
|
---|
| 288 |
|
---|
| 289 | <varlistentry id="db_recover">
|
---|
| 290 | <term><command>db_recover</command></term>
|
---|
| 291 | <listitem>
|
---|
| 292 | <para>is used to restore a database to a consistent state after a
|
---|
| 293 | failure.</para>
|
---|
| 294 | <indexterm zone="db db_recover">
|
---|
| 295 | <primary sortas="b-db_recover">db_recover</primary>
|
---|
| 296 | </indexterm>
|
---|
| 297 | </listitem>
|
---|
| 298 | </varlistentry>
|
---|
| 299 |
|
---|
| 300 | <varlistentry id="db_stat">
|
---|
| 301 | <term><command>db_stat</command></term>
|
---|
| 302 | <listitem>
|
---|
| 303 | <para>displays database environment statistics.</para>
|
---|
| 304 | <indexterm zone="db db_stat">
|
---|
| 305 | <primary sortas="b-db_stat">db_stat</primary>
|
---|
| 306 | </indexterm>
|
---|
| 307 | </listitem>
|
---|
| 308 | </varlistentry>
|
---|
| 309 |
|
---|
| 310 | <varlistentry id="db_upgrade">
|
---|
| 311 | <term><command>db_upgrade</command></term>
|
---|
| 312 | <listitem>
|
---|
| 313 | <para>is used to upgrade database files to a newer version of
|
---|
| 314 | <application>Berkeley DB</application>.</para>
|
---|
| 315 | <indexterm zone="db db_upgrade">
|
---|
| 316 | <primary sortas="b-db_upgrade">db_upgrade</primary>
|
---|
| 317 | </indexterm>
|
---|
| 318 | </listitem>
|
---|
| 319 | </varlistentry>
|
---|
| 320 |
|
---|
| 321 | <varlistentry id="db_verify">
|
---|
| 322 | <term><command>db_verify</command></term>
|
---|
| 323 | <listitem>
|
---|
| 324 | <para>is used to run consistency checks on database files.</para>
|
---|
| 325 | <indexterm zone="db db_verify">
|
---|
| 326 | <primary sortas="b-db_verify">db_verify</primary>
|
---|
| 327 | </indexterm>
|
---|
| 328 | </listitem>
|
---|
| 329 | </varlistentry>
|
---|
| 330 |
|
---|
| 331 | </variablelist>
|
---|
| 332 |
|
---|
| 333 | </sect2>
|
---|
[f45b1953] | 334 |
|
---|
| 335 | </sect1>
|
---|