Difference between revisions of "Berkeley DB"
Line 129: | Line 129: | ||
chown -v root:root /usr/bin/berkeley_db_svc && | chown -v root:root /usr/bin/berkeley_db_svc && | ||
chown -v -R root:root /usr/share/doc/db-{{Berkeley DB-Version}} | chown -v -R root:root /usr/share/doc/db-{{Berkeley DB-Version}} | ||
+ | |||
+ | [[Category:Servers]] |
Revision as of 14:08, 19 March 2009
Download Source: | http://download.oracle.com/berkeley-db/db-5.3.21.tar.gz |
---|
Contents
Introduction to Berkeley DB
The Berkeley DB package contains programs and utilities used by many other applications for database related functions.
Project Homepage: Unknown
Dependencies
Optional
Additional Configuration Options
--enable-java: Enables the building of the Berkeley DB Java API (JDK).
--enable-pthread_api: Enables the POSIX thread library.
--enable-tcl: Enables the bulding of the Berkeley DB TCL API. You will need the --with-tcl=DIR flag if you use this one.
--enable-test: Enables the building of the test suite. The Berkeley DB TCL API must be built to run the test suite.
--with-tcl=DIR: This flag tells configure where TCL's tclConfig.sh is located. The default is /usr/local/lib, so if you want to enable TCL support in Berkeley DB, you will need to use this flag. tclConfig.sh will be in /usr/lib, /usr/lib32, or /usr/lib64 - depending on which architecture you're building for.
Test Suite Notes
Berkeley DB has a very extensive test suite. It will take hours - possibly half the day - to run. In addition, it's pretty much a guarantee that you'll have at least a few errors. So, think twice - perhaps even three or four times - before running it.
If you decide that you actually want to run the test suite, then you must have TCL installed and pass the following flags to configure:
--enable-tcl --with-tcl=DIR --enable-test
After running make, you will run:
tclsh
This opens up the TCL shell from where you will run the test suite:
source ../test/test.tcl run_parallel 5 run_std exit
So, after the run_parallel 5 run_std command you can run off to watch the entire Lord of the Rings or something. When you get back, you're going to have to build Berkeley DB again. This is because it is not recommended to use Berkeley DB configured with --enable-test on a production system.
So run make realclean and then run configure without the --enable-test flag. You can keep the TCL-related flags if you want to because TCL support in Berkeley DB can still be useful, but we don't want the test suite enabled. After that of course, you continue with building and installing Berkeley DB as normal.
Non-Multilib
Compile the package:
cd build_unix && ../dist/configure --prefix=/usr \ --enable-compat185 --enable-cxx --enable-rpc && make
Install the package
make docdir=/usr/share/doc/db-5.3.21 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-5.3.21
Command Explanations
--enable-compat185: This flag makes it so that you can compile or load Berkeley DB 1.85 applications against this release of the Berkeley DB library.
--enable-cxx: Enables the building of the Berkeley DB C++ API.
--enable-rpc: Enables the building of the Berkeley DB RPC client code and server utility.
docdir=/usr/share/doc/db-5.3.21: This tells make to install the documentation in /usr/share/doc instead of the default /usr/docs.
chown -v root:root...: The makefile uses cp -p to install files. As such, the files are owned by the user that built them. So, unless you want that to be the case (as in the package user package management system) you're going to want to chown them to root.
Multilib
32Bit
Compile the package:
cd build_unix && CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ../dist/configure --prefix=/usr \ --enable-compat185 --enable-cxx --enable-rpc && make
Install the package
make docdir=/usr/share/doc/db-5.3.21 install && chown -v root:root /usr/bin/db_* /usr/lib/libdb* /usr/include/db* && chown -v root:root /usr/bin/berkeley_db_svc && chown -Rv root:root /usr/share/doc/db-5.3.21
N32
Compile the package:
cd build_unix && CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" ../dist/configure --prefix=/usr \ --libdir=/usr/lib32 --enable-compat185 --enable-cxx --enable-rpc && make
Install the package
make docdir=/usr/share/doc/db-5.3.21 install && chown -v root:root /usr/bin/db_* /usr/lib32/libdb* /usr/include/db* && chown -v root:root /usr/bin/berkeley_db_svc && chown -v -R root:root /usr/share/doc/db-5.3.21
64Bit
Compile the package:
cd build_unix && CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" ../dist/configure --prefix=/usr \ --libdir=/usr/lib64 --enable-compat185 --enable-cxx --enable-rpc && make
Install the package
make docdir=/usr/share/doc/db-5.3.21 install && chown -v root:root /usr/bin/db_* /usr/lib64/libdb* /usr/include/db* && chown -v root:root /usr/bin/berkeley_db_svc && chown -v -R root:root /usr/share/doc/db-5.3.21