Compiling OpenLDAP on Debian Lenny

Download the latest OpenLDAP source from the site (

Go to /usr/src/ and untar the source package.

tar xzvf openldap-stable-20100719.tgz
cd openldap-2.4.23

Then install the following prerequisites that are needed to compile OpenLDAP.

apt-get install build-essential cyrus-sasl2-dbg openssl libtool libdb-dev gnutls-dev libsasl2-dev

Then start compiling OpenLDAP.

make depend
make test
make install

OpenLDAP Should be working now.

For configuration files, look in /usr/local/etc/openldap/.

Uninstalling such an installation is a bit of pain in the ass. OpenLDAP does not have a make uninstall defined. So, the files have to be manually deleted.

To identify which files are to be deleted, do an install to a temporary directory and note down the files.

make install DESTDIR=/tmp/ldap/

2 thoughts on “Compiling OpenLDAP on Debian Lenny