Berkeley DB-5.2.36
Testing Berkeley DB
You may want to skip ahead to the
section called “Installation of Berkeley DB”. The
test suite can take up to 150 SBUs and has a few bugs causing a
report of “Regression tests
failed”. However, running the test suite is a very
exhaustive test of your hardware, perhaps pushing your machine
harder (especially disk I/O) than it will ever see during
production use. Note that you must have Tcl installed to run the test suite.
Build for the Berkeley DB test by
running the following commands:
cd build_unix &&
../dist/configure --prefix=/usr \
--enable-test \
--enable-tcl \
--enable-dbm \
--with-tcl=/usr/lib &&
make
To test the results, start tclsh:
tclsh
From the tclsh prompt
(%
), run:
source ../test/tcl/test.tcl
run_parallel 5 run_std
exit
Clean up the source tree with the following command:
make realclean &&
cd ..
Note
Test127.f and Repmgr026.c are known to fail.
There are additional testing suites in the test/c
and test/cxx
directories. See the README
in each
directory for instructions on how to run the tests.
Installation
of Berkeley DB
Note
If you plan on installing Berkeley
DB with Java support, you should check the system for
certain versions of JDK-6 Update 18 and GMime-2.4.21. Specifically, if JDK-6 Update X and the uudecode program from the
GMime program is on the system,
the build will fail (unless you run the modified ./configure command shown
below). You can run two commands (javac -version and uudecode --version) to
determine what versions are installed. You can also download and
run a shell script from
http://anduin.linuxfromscratch.org/files/BLFS/svn/jdk-uudecode-check.sh
that will alert you to a non-working condition. If the identified
programs exist on the system, you must modify the ./configure command as shown
below.
uudecode="no" ../dist/configure --(use the parameters shown below)
Install Berkeley DB by running the
following commands:
cd build_unix &&
../dist/configure --prefix=/usr \
--enable-compat185 \
--enable-dbm \
--enable-cxx &&
make
Now, as the root
user:
make docdir=/usr/share/doc/db-5.2.36 install &&
chown -v -R root:root \
/usr/bin/db_* \
/usr/include/db{,_185,_cxx}.h \
/usr/lib/libdb*.{so,a,la} \
/usr/share/doc/db-5.2.36
Command Explanations
cd build_unix &&
../dist/configure --prefix=/usr...: This replaces
the normal ./configure command, as
Berkeley DB comes with various
build directories for different platforms.
--enable-compat185
: This
switch enables building the DB-1.85 compatibility API.
--enable-cxx
: This switch
enables building C++ API libraries.
--enable-tcl
--with-tcl=/usr/lib
: Enables Tcl support in DB and creates the libdb_tcl
libraries.
--enable-dbm
: Enables
legacy interface support support needed by some older packages.
--enable-java
: Enables
Java support in DB and creates the
libdb_java
libraries.
make docdir=/usr/share/doc/db-5.2.36
install: This installs the documentation in the
standard location instead of /usr/docs
.
chown -v -R root:root
...:This command changes the ownership of various
installed files from the uid:gid of the builder to root:root.
Contents
Installed Programs:
db_archive, db_checkpoint, db_deadlock,
db_dump, db_load, db_printlog, db_recover, db_stat, db_upgrade,
db_verify
Installed Libraries:
libdb.{so,a}, libdb_cxx.{so,a},
libdb_java.{so,a}, libdb_tcl.{so,a} and db.jar
Installed Directory:
/usr/share/doc/db-5.2.36
Short Descriptions
db_archive
|
prints the pathnames of log files that are no longer in
use.
|
db_checkpoint
|
is a daemon process used to monitor and checkpoint
database logs.
|
db_deadlock
|
is used to abort lock requests when deadlocks are
detected.
|
db_dump
|
converts database files to a flat file format readable by
db_load.
|
db_load
|
is used to create database files from flat files created
with db_dump.
|
db_printlog
|
converts database log files to human readable text.
|
db_recover
|
is used to restore a database to a consistent state after
a failure.
|
db_stat
|
displays database environment statistics.
|
db_upgrade
|
is used to upgrade database files to a newer version of
Berkeley DB.
|
db_verify
|
is used to run consistency checks on database files.
|
Last updated on 2011-12-23 00:15:28 +0000