[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: LDAP with the BerkeleyDB

I'm running openldap-1.2.11 on Slackware 7.1 (glibc-2.1.3).  Should
be close to what you're running.  Here's how I got it going:

Untar db-2.7.7, and:
	cd db-2.7.7/build_unix
	make ; make install
This only builds the static library.  To build the shared library, read
docs/build/shared_gcc.html.  Remember to add /usr/local/BerekelyDB/lib
to /etc/ld.so.conf and run ldconfig.

If you're running Linux with Linuxthreads, you have to install GNU pth.
(Refer FAQ-o-Matic, under the Linux platform hints to see why).

Untar pth-1.3.7:
	./configure --enable-optimize --enable-tests --enable-syscall-soft
	make ; make test ; make install

Now untar openldap-1.2.11 and:
	export CPPFLAGS="-I/usr/local/BerkeleyDB/include"
	export LDFLAGS="-L/usr/local/BerkeleyDB/lib"
	./configure --with-threads=pth --enable-shared --with-gnu-ld \
	--with-ldbm-api=db2 --enable-slurpd --with-yielding-select=no
	make ; make install

If you run the 'make test', it will probably fail at some point.  This is
because there is a problem somewhere with threads where slapd hangs in
select(), and will not exit normally on kill signals.  (I've tried
different combinations of --with-yielding-select with no success). 
Compiling --without-threads works as expected, but then you can't use

However, if you do an echo "" | ldapadd -p <slapd port> after killing
the process, the server will pop out of select and close properly (or
so it seems).  All you need to get the tests to work is add
'echo "" | ldapadd -p 9009' just before the 'sleep 5' at the end of

Also remember to fix your system shutdown scripts to do the same when
shutting down.

Carl Litt
Network Administrator
Execulink Internet Services

On Tue, 22 Aug 2000, Gerry Maddock wrote:

>     Is anyone out there running openldap w/the BerkelyDB? I'm working on
> a sys running RH6.2. After I unzipped the tarball and
> went into the openldap-1.2.11 directory. At the bash prompt I typed the
> following:
> # CPPFLAGS=-I/usr/local/BerkeleyDB/include
> #LDFLAGS=-L/usr/local/BerkeleyDB/lib
> #LIBS="-lpthread -lposix4"
> #./configure --with-threads --with-ldbm-api=db2
> I get the following error:
> configure: error: installation or configuration problem: C compiler
> cannot create executables.
> I have the berkeley DB installed, when I just run ./configure by itself,
> the compiler is able to make the make file. Any ideas? Thank you in
> advance for any help.
> By the way, I was working off the following article:
> http://www.linuxworld.com/linuxworld/lw-1999-07/lw-07-ldap_tutorial.html