τBerkeleyDB
- Berkeley DB Reference Guide:
- Installation Guide: Install on UNIX
Install on UNIX
This Temporal Subsystem supports BerkeleyDB 3.2.9a, which has been tested. It also may support other 3.x.x versions. The package is downloadable here.
Currently, this package is only working under UNIX systems, specifically Fedora 7 on 32-bit architectures, though it will probably work on previous versions of Fedora as well as other versions of Unix.
Below the original BerkeleyDB system is called BDB for short. The Temporal Subsystem Package for BerkeleyDB is called TBDB.
Installing TBDB requires installation of Beecrypt (a cryptography toolkit), which can be downloaded http://sourceforge.net/projects/beecrypt. The steps below will ensure that Beecrypt has been properly installed before installation of TBDB.
We recommend making a source directory <SOURCE_DIR>
(e.g., /home/mike/tbdbSOURCE) for installation, putting the BDB source tree,
Beecrypt toolkit and TBDB package in the same source directory. There are also two directories (perhaps
one directory serving two purposes) for the installed beecrypt and τBerkerly DB installation,
<BEECRYPT_DIR> and <TBDB_DIR>. For our example, we'll use /usr/local/beecrypt
and /usr/local/tbdb, respectively.
We first give the steps to install the system, then give the steps to later uninstall it. All indicated commands are a single line each.
INSTALL TBDB 3.2.9
**********************
- Download the BDB 3.2.9 package from http://www.oracle.com/technology/software/products/berkeley-db/index.html.
If you have already installed a copy of the BDB,
you don't have to download it again; jump
to step (3).
- Untar the BDB source tree to the source directory:
tar -C<SOURCE_DIR>-xvf db-3.2.9.tar.gzwhere <SOURCE_DIR> is replaced by the path to the source directory for installation. For example,
tar -C /home/mike/tbdbSOURCE -xvf db-3.2.9.tar.gz
This will create a directory, e.g.
/home/mike/tbdbSOURCE/db-3.2.9/. - Retrieve TBDB package (
tbdb-install.tar.gz).
- Untar the TBDB package to the source directory:
tar -C<SOURCE_DIR>-xvf tbdb-install.tar.gzFor example,
tar -C /home/mike/tbdbSOURCE -xvf tbdb-install.tar.gzThis will create a directory, e.g.
/home/mike/tbdbSOURCE/tbdb-install/. - Download Beecrypt package from http://sourceforge.net/projects/beecrypt.
If you have already installed a copy of the Beecrypt you don't have to
download it again; jump to step (11).
- Untar Beecrypt source tree to the source directory:
tar -C<SOURCE_DIR>-xvf beecrypt-4.1.2.tar.gzFor example,
tar -C /home/mike/tbdbSOURCE -xvf beecrypt-4.1.2.tar.gzThis will create a directory, e.g.
/home/mike/tbdbSOURCE/beecrypt-4.1.2/. - Go to the Beecrypt source directory. For example,
cd /home/mike/tbdbSOURCE/beecrypt-4.1.2 - Configure the path of Beecrypt installation using the Beecrypt destination,<BEECRYPT_DIR>.
./configure --prefix=<BEECRYPT_DIR>For example,
[beecrypt-4.1.2]$ ./configure --prefix=/usr/local/beecryptIf the
prefixdirectory requires superuser access to create and write, then be sure to execute step 10 as superuser. Otherwise, use aprefixthat the user has permission to create. - Build Beecrypt library by
[beecrypt-4.1.2]$ make - Install Beecrypt library by
[beecrypt-4.1.2]$ make installThis will create another directory, e.g.
/usr/local/beecrypt/.Note that this step may generate errors if you don't have write permission to various system directories such as
/usr/lib/. However, these errors will not affect the installation or running of TBDB. - Go into the <SOURCE_DIR> directory and then into the
tbdb-installsubdirectory. For example,cd /home/mike/tbdbSOURCE/tbdb-install -
The installation takes parameters for the paths to Berkeley DB source tree,
Beecrypt header files, and libraries.
The following are examples of these parameters.
Parameter Name Parameter Value Example BDBVER3 BDBVER=3BDBORIG<BDB_SRC_TREE_DIR> BDBORIG=/home/mike/tbdbSOURCE/db-3.2.9BEEHEADER<BEECRYPT_HEADER_DIR> BEEHEADER=
/usr/local/beecrypt/include/beecryptBEELIB<BEECRYPT_LIB_DIR> BEELIB=
/usr/local/beecrypt/libRun
make -n source BDBVER=3 BDBORIG=<BDB_SRC_TREE_DIR>BEEHEADER=<BEECRYPT_HEADER_DIR>BEELIB=<BEECRYPT_LIB_DIR>to check the list of changes that TBDB package installation script will do to the original BerkeleyDB source tree, where <BDB_SRC_TREE_DIR> is replaced with the path to the original BerkeleyDB source tree. <BEECRYPT_HEADER_DIR> is replaced by the path to the Beecrypt header file directory. <BEECRYPT_LIB_DIR> is replaced by the path to the Beecrypt library directory. For example,
[tbdb-install]$ make -n source BDBVER=3 BDBORIG=/home/mike/tbdbSOURCE/db-3.2.9 BEEHEADER=/usr/local/beecrypt/include/beecrypt BEELIB=/usr/local/beecrypt/libWe emphasize that the actual installation occurs in the next step (without "
-n"). - Run
make source BDBVER=3 BDBORIG=<BDB_SRC_TREE_DIR>BEEHEADER=<BEECRYPT_HEADER_DIR>BEELIB=<BEECRYPT_LIB_DIR>to patch the Temporal Subsystem into a copy of the original BerkeleyDB source tree. For example,
[tbdb-install]$ make source BDBVER=3 BDBORIG=/home/mike/tbdbSOURCE/db-3.2.9 BEEHEADER=/usr/local/beecrypt/include/beecrypt BEELIB=/usr/local/beecrypt/libNote: comments to the user printed by
makeare preceeded by "===>".At this point, db-3.2.9 has been installed and now supports temporal databases. The patched version will be in <SOURCE_DIR>
/TBDB/. - Go into the tBDB build directory. For example,
cd /home/mike/tbdbSOURCE/TBDB/build_unix - Run
[TBDB/build_unix]$ make distcleanto clean the old configurations. If "make" complains about no Makefile exists, that means we don't have old configurations left, you can just ignore the complaint.
- Configure the BerkeleyDB system with
../dist/configure<OPTIONS>(Run
../dist/configure --helpfor the detail of <OPTIONS>. All the options available in BerkeleyDB are still applicable in TBDB. In particular,
--prefixshould indicate where the system should be placed, in this case, <TBDB_DIR>.)For example,
[TBDB/build_unix]$ ../dist/configure --prefix=/usr/local/tbdb - Build the BerkeleyDB with Temporal Subsystem by
[TBDB/build_unix]$ makeThis will, among other things, link in Beecrypt.
- Install the BerkeleyDB with Temporal Subsystem by
[TBDB/build_unix]$ make installThis will create the installed version of τBerkeley DB in the destination directory <TBDB_DIR>, which in our example is
/usr/local/tbdb. - Run some simple test cases of the temporal support by
[TBDB/build_unix]$ make temporal_testThe final test result will be given after the testcases are done. A message of "
Final result: SUCCESSFUL :-)" is expected. If not, something is wrong.
- At this point, as desired, the original <SOURCE_DIR>/db-3.2.9 and <SOURCE_DIR>/tbdb-install directories can be deleted.
For example,
cd /home/mike/tbdbSOURCErm -fr db-3.2.9 tbdb-install
tbdb-install.script ) that can be edited with these steps. This
script may be helpful for your installation.
UNINSTALL BDB 3.2.9
**********************
- Go into the BDB
build_unixdirectory. For example,cd /home/mike/tbdbSOURCE/db-3.2.9/build_unix
- Run
make distcleanto clean all configurations for temporal support.
- Reconfigure the BerkeleyDB by
../dist/configure<OPTIONS>(Run
../dist/configure --helpfor the detail of <OPTIONS>).
- Build the original BerkeleyDB by
make
- Install the original BerkeleyDB by
make install
At this point, only the original Berkeley DB remains.
Developed by the TAU Project, Computer Science Department, University of Arizona