Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

InstallGuide BerkeleyDBInstall

Tomasz Sterna edited this page Oct 18, 2012 · 3 revisions

Go up: ParentWiki

A.3. Installing Berkeley DB for Jabberd 2

Berkeley DB (version 4.1.24 or higher) is one of the three database systems that can be configured to provide data storage for Jabberd 2. This appendix describes how to download the Berkeley DB source in order to build and install if for Jabberd 2. The advantage of using Berkeley DB for Jabberd data storage is that Berkeley DB requires no configuration, maintenance or administration after it is installed.

A.3.1. Download Berkeley DB Installation Files

Download the file db-4.1.nn.tar.gz from the Berkeley DB Downloads page, where "nn" is the latest version of Berkeley DB. At the time of writing, Berkeley DB 4.1.25 is the most current version, and is used in the examples below.

Note that if you choose a version with strong encryption, you should follow your local laws if you download it.

A.3.2. Extract Berkeley DB Files

Change to the directory where you downloaded the file above and then extract the Berkeley DB files by running the command:

    tar -zxvf db-4.1.25.tar.gz
At the time of writing, there is a patch for Berkeley DB version 4.1.25. You can apply this patch by first downloading the patch to the directory where you extracted the Berkeley DB files, for example db-4.1.25. Then run patch -p0 < patchfile to apply the patch, for example:
    patch -p0 < patch.4.1.25.1

A.3.3. Build Berkeley DB

Change to the build_unix directory of the Berkeley DB directory just created:

    cd db-4.1.25/build_unix
Configure Berkeley DB for your system. Berkeley DB uses its directory structure to identify the operating system type, so the "configure" command is different from most:
    ../dist/configure --prefix=/usr
The prefix command will install the package under /usr, where it will be easier to find by other applications.

Note that the default configuration should make Berkeley DB work with Jabberd 2 — enabling Berkeley DB optimizations may create compatibility issues for Jabberd 2.

Build Berkeley DB on your system:

    make

A.3.4. Install Berkeley DB

Switch to the super-user:

    su
Install Berkeley DB on your system:
    make install
Berkeley DB installation is now complete -- unless the make install output shows errors. If you receive errors, refer to documentation on the Berkeley DB site.

© 2003 Will Kamishlian and Robert Norris

Image(http://jabberd.jabberstudio.org/2/docs/ccommons.gif, right)This work is licensed under the Creative Commons Attribution-!NonCommercial-!ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/1.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.