Install openLDAP in ubuntu

Fathima Dilhasha
‘How to’ Guides by Dilhasha
1 min readApr 26, 2017

openLDAP is an implementation of the LDAP protocol which is widely used.

First download the latest version of openLDAP at [1].

Before installing the LDAP server make sure you have these libraries installed.

sudo apt-get install libdb-dev
sudo apt-get install libltdl-dev
sudo apt-get install libsasl2-dev

Then let’s install openLDAP.

  1. Unpack the distribution and change directory:

tar xfz openldap-VERSION.tgz
cd openldap-VERSION

2. configure the build system.

./configure

To make sure you have sasl support, explicitly request as follow.

./configure --with-cyrus-sasl

3. Build dependencies.

make depend

4. Build the system:

make

5. Test the standalone system.

make test

6. Install openLDAP

su root -c ‘make install’

7. Start LDAP server

su root -c /usr/local/libexec/slapd

8. Test with ldapsearch

ldapsearch -x -b ‘’ -s base ‘(objectclass=*)’ namingContexts

9. Stop the server.

sudo kill -INT `cat /usr/local/var/run/slapd.pid`

[1]https://www.openldap.org/software/download/

Enjoy!

--

--