(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) OpenLDAP Software FAQ : (Category) Installation : (Answer) How do I force LDBM to use of BerkeleyDB?
Note: back-ldbm is deprecated in favor of back-bdb and back-hdb.
Kurt@OpenLDAP.org
You can force configure to use a specific database manager using the --with-ldbm-api option.

To specify use of Sleepycat BerkeleyDB (release 2.x or greater), use:

./configure --with-ldbm-api=berkeley
To specify use of older BerkeleyDB 1.86, use:
./configure --with-ldbm-api=bcompat

See Also: (Xref) Which version of BerkeleyDB should I use?
If you have installed BerkeleyDB such that its headers and libraries will not be found automatically by the C translator and linker, you will need to specify additional include and lib search directories.
  env CPPFLAGS="-I/usr/local/BerkeleyDB/include" \
      LDFLAGS="-L/usr/local/BerkeleyDB/lib" ./configure

See Also:
(Xref) How do I specify additional compiler include/lib search directories?

In addition, if your Berkeley DB library is a shared library, you may need to tell the system linker where to find the shared library at runtime. This depends on whether or not the library path was hard-coded into the executables when slapd was built, and is also operating system-dependent.

On Linux, Solaris, IRIX, and other SVR4-derived systems you do this using the LD_LIBRARY_PATH environment variable. On AIX the same thing is done using the LIBPATH variable. On HP-UX use SHLIB_PATH. For example, on Linux:

LD_LIBRARY_PATH=/usr/local/BerkeleyDB/lib; export LD_LIBRARY_PATH

hyc@openldap.org
In order to start OpenLDAP daemons under *BSD systems you must register berkeley db libraries by ldconfig utility. If you want that this can be done automatically during system startup: under OpenBSD, add a path to your db library directory to shlib_dirs variable in /etc/rc.conf.local file (e.g. shlib_dirs=/usr/local/db/lib) under FreeBSD, add such path in file /etc/ld-elf.so.conf. In any cases you can look at manual page ldconfig(8).
scum001@gmail.com
[Append to This Answer]
Previous: (Answer) How do I select a suitable LDBM backend?
Next: (Answer) How do I force LDBM to use of GDBM?
This document is: http://www.openldap.org/faq/index.cgi?file=40
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org