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.
Download (FTP): ftp://sleepycat1.inetu.net/releases/db-4.3.27.tar.gz
Download MD5 sum: fcc481d52c3b80e20a328f8c0cb042bd
Download size: 5.7 MB
Estimated disk space required: 68 MB
Estimated build time: 1.23 SBU
Install Berkeley DB by running the following commands:
cd build_unix && ../dist/configure --prefix=/usr \ --enable-compat185 \ --enable-cxx && make LIBSO_LIBS="-lpthread" LIBXSO_LIBS="-lpthread" && make docdir=/usr/share/doc/db-4.3.27 install
Note: If you build the package as an unprivileged user, then switch to the root user to install the package, Berkeley DB will install the files with ownerships of the user building the package. This is undesireable. Change the ownership of the installed files using the following commands:
chown root:root /usr/bin/db_* \ /usr/lib/libdb* /usr/include/db* && chown -R root:root /usr/share/doc/db-4.3.27
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 DB 1.85 compatibility API.
--enable-cxx: This switch enables building C++ API.
make LIBSO_LIBS="-lpthread" LIBXSO_LIBS="-lpthread": configure does not correctly handle NPTL. These variables force it to properly link against NPTL.
make docdir=/usr/share/doc/db-4.3.27 install: This installs the documentation in the correct place.
--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.
The Berkeley DB package contains db_archive, db_checkpoint, db_deadlock, db_dump, db_load, db_printlog, db_recover, db_stat, db_upgrade, db_verify and the libdb libraries.