NetBSD/gnu/dist/postfix/DB_README

69 lines
2.6 KiB
Plaintext

Purpose of this document
========================
This document describes how to build Postfix with third-party
Berkeley DB from www.sleepycat.com, or how to choose a specific
Berkeley DB version when your system provides multiple implementations.
Building Postfix with Sleepycat Berkeley DB
===========================================
Many commercial UNIXes ship without Berkeley DB support. Examples
are Solaris, HP-UX, IRIX, UNIXWARE. In order to build Postfix with
Berkeley DB support you need to download and install the source
code from www.sleepycat.com.
To build Postfix after you installed the Berkeley DB from Sleepycat,
use something like:
% make tidy
% make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB.3.1/include" \
AUXLIBS=/usr/local/BerkeleyDB.3.1/lib/libdb.a
% make
The exact pathnames depend on the DB version that you installed.
For example, Berkeley DB version 2 installs in /usr/local/BerkeleyDB.
Beware, the file format produced by Berkeley DB version 1 is not
compatible with that of versions 2 and 3 (versions 2 and 3 have
the same format). If you switch between DB versions, then you may
have to rebuild all your Postfix DB files.
Building Postfix on BSD systems with a specific Berkeley DB version
===================================================================
Some BSD systems ship with multiple Berkeley DB implementations.
Normally, Postfix builds with the default DB version that ships
with the system.
To build Postfix on BSD systems with a specific DB version, use a
variant of the following commands:
% make tidy
% make makefiles CCARGS=-I/usr/include/db2 AUXLIBS=-ldb2
% make
Beware, the file format produced by Berkeley DB version 1 is not
compatible with that of versions 2 and 3 (versions 2 and 3 have
the same format). If you switch between DB versions, then you may
have to rebuild all your Postfix DB files.
Building Postfix on Linux with a specific Berkeley DB version
=============================================================
Some Linux systems systems ship with multiple Berkeley DB
implementations. Normally, Postfix builds with the default DB
version that ships with the system.
On Linux, you need to edit the makedefs script in order to specify
a non-default DB library.
The reason is that the location of the default db.h include file
changes randomly between vendors and between versions, so that
Postfix has to choose the file for you.
Beware, the file format produced by Berkeley DB version 1 is not
compatible with that of versions 2 and 3 (versions 2 and 3 have
the same format). If you switch between DB versions, then you may
have to rebuild all your Postfix DB files.