Contents
Only the program and libraries not installed in LFS are listed here, the others can be found at ../../../../lfs/view/6.2/chapter06/db.html#contents-db as they were initially installed during the building of LFS.
This chapter includes databases that range from single-user read/write to industrial database servers with transaction support. Generally, you will be sent here to satisfy dependencies to other applications although building a SQL server on a base LFS system is entirely possible.
The Berkeley DB package contains programs and utilities used by many other applications for database related functions. This package is also installed during LFS and may already exist on your system. It is listed here in BLFS as well because you may need to reinstall it if you need the additional language bindings or the RPC server. If you do reinstall Berkeley DB, ensure you use the 4.4.20 version used in the LFS book.
Download (HTTP): http://downloads.sleepycat.com/db-4.4.20.tar.gz
Download (FTP): ftp://ftp.sleepycat.com/releases/db-4.4.20.tar.gz
Download MD5 sum: d84dff288a19186b136b0daf7067ade3
Download size: 7.9 MB
Estimated disk space required: 66.7 MB (additional 100 MB to run parallel standard test suite)
Estimated build time: 1.4 SBU (builds all bindings, add an additional 145 SBU to run parallel standard test suite)
Required patch: http://www.sleepycat.com/update/4.4.20/patch.4.4.20.1
Required patch: http://www.sleepycat.com/update/4.4.20/patch.4.4.20.2
Required patch: http://www.sleepycat.com/update/4.4.20/patch.4.4.20.3
Required patch: http://www.sleepycat.com/update/4.4.20/patch.4.4.20.4
Tcl-8.4.13, JDK-1.5.0_10, and sharutils (for the uudecode command)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/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:
for PATCH in ../patch.4.4.20.{1..4}; do patch -Np0 -i $PATCH; done && cd build_unix && ../dist/configure --prefix=/usr \ --enable-test \ --enable-tcl \ --with-tcl=/usr/lib && make
To test the results, start tclsh:
tclsh
From the tclsh prompt (% ), run:
source ../test/test.tcl run_parallel 5 run_std exit
Clean up the source tree with the following command:
make realclean && cd ..
The installation commands below are identical to the commands used in the LFS book. If you installed Berkeley DB in LFS, and you don't add anything to the configure script, you'll end up with exactly what you already have. The additional parameters you can use are listed in the Command Explanations section below. Install Berkeley DB by running the following commands:
for PATCH in ../patch.4.4.20.{1..4}; do patch -Np0 -i $PATCH; done && cd build_unix && ../dist/configure --prefix=/usr \ --enable-compat185 \ --enable-cxx && make
Now, as the root user:
make docdir=/usr/share/doc/db-4.4.20 install && chown -v root:root /usr/bin/db_* /usr/lib/libdb* /usr/include/db* && chown -v root:root /usr/bin/berkeley_db_svc && chown -v -R root:root /usr/share/doc/db-4.4.20
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-java: Enables Java support in DB and creates the libdb_java libraries.
--enable-rpc: Enables building the Berkeley DB RPC server.
make docdir=/usr/share/doc/db-4.4.20 install: This installs the documentation in the correct location instead of /usr/docs.
chown -v root:root /usr/bin/berkeley_db_svc: This command changes the ownership of the RPC server program. It is only required if you passed --enable-rpc to the configure script.
Only the program and libraries not installed in LFS are listed here, the others can be found at ../../../../lfs/view/6.2/chapter06/db.html#contents-db as they were initially installed during the building of LFS.
Last updated on 2007-01-15 18:08:14 -0600