BerkeleyDB Temporal Subsystem Package Installation Guide ============================================================== 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 from http://www.cs.arizona.edu/projects/tau/tbdb/tbdb-release.tar.gz Currently, this package is only working under UNIX systems, specifically Fedora 7 on 32-bit architectures, though it may 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 4.1.2 (a cryptography toolkit), which can be downloaded from 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/tbdb-source) for installation (see instruction below), putting the BDB source tree, Beecrypt toolkit and TBDB package in the same source directory. There are also two directories for the installed beecrypt and tBerkerly 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 ********************** The "[~]$" shown below is just the shell prompt from bash, showing the current directory. Please don't type it; the actual commands follow this prompt. Note also that each command is on a single line, without any newlines. 0. Prepare the directories [~]$bash SOURCE_DIR=/home/mike/tbdb-source; export SOURCE_DIR [~]$bash BEECRYPT_DIR=/usr/local/beecrypt; export BEECRYPT_DIR [~]$bash TBDB_DIR=/usr/local/tbdb; export TBDB_DIR [~]$bash mkdir -p $SOURCE_DIR [~]$bash cd $SOURCE_DIR; cd .. 1. Download the BDB 3.2.9 package from http://www.oracle.com/technology/software/products/berkeley-db/db/index.html If you have already installed version 3.2.9 of the BDB, you don't have to download it again; jump to step (3). 2. Untar the BDB source tree to the build directory: [~]$ tar -C $SOURCE_DIR -xzf db-3.2.9.tar.gz This will create the directory $SOURCE_DIR/db-3.2.9/ . 3. Retrieve the TBDB package from http://www.cs.arizona.edu/projects/tau/tbdb/release_X.Y.tar.gz Note that X.Y is the release version. For instance, the package of release is named release_0.3.tar.gz 4. Untar the TBDB package to the build directory: [~]$ tar -C $SOURCE_DIR -xzf release_0.3.tar.gz This will create the directory $SOURCE_DIR/deployable/src . 5. Download the Beecrypt package from http://sourceforge.net/projects/beecrypt Be careful which version you have. It should be 4.1.2 and not a subsequent version (such as the very similar 4.2.1). If you have already installed a copy of the Beecrypt version 4.1.2 you don't have to download it again; jump to step (9). 6. Untar Beecrypt source tree to the build directory: [~]$ tar -C $SOURCE_DIR -xzf beecrypt-4.1.2.tar.gz This will create the directory $SOURCE_DIR/beecrypt-4.1.2/ . 7. Configure and build the Beecrypt package installation using the Beecrypt destination, $BEECRYPT_DIR. Note that during the beecrypt building process, error may occur within various system environments. For instance, the make process may complaint missing Python.h or c++ related errors. In such cases, it is suggested to apply the following configure flags. --with-cplusplus=no --with-python=no For detailed explanation, please refer to ./configure --help [~]$ cd $SOURCE_DIR/beecrypt-4.1.2 [beecrypt-4.1.2]$ ./configure --prefix=$BEECRYPT_DIR [beecrypt-4.1.2]$ make 8. Install Beecrypt library. If the prefix directory requires superuser access to create and write, then be sure to execute this as superuser. [beecrypt-4.1.2]$ make install This will create the directory, $BEECRYPT_DIR, and install the beecrypt package there. 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. 9. The following commands will show the changes to be made for the Temporal Subsystem to bdb. The operation takes parameters for the paths to Berkeley DB source tree, Beecrypt header files, and libraries. [beecrypt-4.1.2]$ cd $SOURCE_DIR/deployable/src [tbdb-release]$ # check the list of changes that TBDB package installation script will do to the original BerkeleyDB source tree [tbdb-release]$ make -n source BDBVER=3 BDBORIG=$SOURCE_DIR/db-3.2.9 BEEHEADER=$BEECRYPT_DIR/include/beecrypt BEELIB=$BEECRYPT_DIR/lib We emphasize that this operation is just to check the changes. The actual installation occurs in the next step (without "-n"). Note: If TBDB is installed on a 64-bit machine, please set $BEELIB to be $BEECRYPT_DIR/lib64 . 10. Apply the patches to install the Temporal Subsystem into a copy of the original BerkeleyDB source tree. [tbdb-release]$ make source BDBVER=3 BDBORIG=$SOURCE_DIR/db-3.2.9 BEEHEADER=$BEECRYPT_DIR/include/beecrypt BEELIB=$BEECRYPT_DIR/lib Note: comments to the user printed by make are preceeded by "===>". If TBDB is installed on a 64-bit machine, please set $BEELIB to be $BEECRYPT_DIR/lib64 . At this point, db-3.2.9 has been patched and now supports temporal databases. The patched version will be in $SOURCE_DIR/TBDB/ . 11. Configure and build the patched BDB. [tbdb-release]$ cd $SOURCE_DIR/TBDB/build_unix [TBDB/build_unix]$ make distclean 12. Configure the BerkeleyDB system. [TBDB/build_unix]$ ../dist/configure --prefix=$TBDB_DIR For details about configure options, run [TBDB/build_unix]$ ../dist/configure --help All the options available in BerkeleyDB are still applicable in TBDB. In particular, --prefix should indicate where the system should be placed, in this case, $TBDB_DIR. 13. Build the BerkeleyDB with Temporal Subsystem by [TBDB/build_unix]$ make This will, among other things, link in Beecrypt. 14. Install the BerkeleyDB with Temporal Subsystem by [TBDB/build_unix]$ make install This will create the installed version of tBerkeley DB in the destination directory $TBDB_DIR, which in our example is /usr/local/tbdb. 15. Run some simple test cases of the temporal support by Note that if 64-bit library is used, execute the following. [TBDB/build_unix]$ LD_LIBRARY_PATH=$BEECRYPT_DIR/lib64 For running the actual tests, execute the following. [TBDB/build_unix]$ make temporal_test The final test result will be given after the testcases are done. A message of "Final result: SUCCESSFUL :-)" is expected. If not, something is wrong. 16. At this point, if desired, the original $SOURCE_DIR/db-3.2.9 and $SOURCE_DIR/tbdb-release directories can be deleted. For example, [~]$ cd $SOURCE_DIR [$SOURCE_DIR]$ rm -fr db-3.2.9 tbdb-release UNINSTALL BDB 3.2.9 ********************** Uninstalling TBDB does not need Beecrypt parameters because uninstallation simply recovers the original BDB files and does not need Beecrypt support. Unistallation follows steps below. 1. Go into the BDB build_unix directory. For example, [~]$ cd $SOURCE_DIR/tbdb-release/TBDB/build_unix 2. Run [build_unix]$ make distclean to clean all configurations for temporal support. 3. Reconfigure the BerkeleyDB by [build_unix]$ ../dist/configure (Run [build_unix]$ ../dist/configure --help for the detail of ). 4. Build the original BerkeleyDB by [build_unix]$ make 5. Install the original BerkeleyDB by [build_unix]$ make install At this point, only the original Berkeley DB remains.