Wednesday 20 August 2014

OpenLDAP installation on Linux

Hi Guys,

OpsnLDAP is a tough nut to crack...isn't it? or is it really.

Lets see.

To install OpenLDAP we first need to install BDB.

*: Prerequsites:

*: Install c & c++ compiler

  • yum install gcc
  • yum install gcc-c++

BerkeleyDB install steps:

  1. Download BDB from: wget http://download.oracle.com/berkeley-db/db-5.1.25.tar.gz
  2. tar xzvf db-5.1.25.tar.gz
  3. cd db-5.1.25
  4. ./dist/configure --prefix=/custom/BerkeleyDB/5.1.25/
  5. make && make install
This install BDB which will be the backend for OpenLDAP.

Now lets install OpenLDAP.

  1. Download Openldap at: wget ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.36.tgz
  2. cd openldap-2.4.36
  3. Set Library paths:

  • export CPPFLAGS="-I /custom/BerkeleyDB/5.1.25/include"
  • export LD_LIBRARY_PATH="/custom/BerkeleyDB/5.1.25/lib"
  • export LDFLAGS="-L/usr/local/lib -L/custom/BerkeleyDB/5.1.25/lib  -R/data/BerkeleyDB/5.1.25/lib"  //note- this step is optional and can be ignored if we are able to run the configure command wthout any error.
   4. ./configure --prefix=/data/openldap/2.4.36
   5. make
   6. make depend
   7. make install

The above steps will work like charm and OpenLDAP  will be installed in a matter of time.

5 comments:

  1. I'm sorry but I have a question about /data folder. What it means? This means that we ourselves must choose folder ?

    ReplyDelete
  2. Hi Marat,

    Yes, you are correct. '/data' is just the folder name. You can choose any folder you want.

    ReplyDelete
  3. is that the same for the customer folder ? and the folders under it ? kinda throws you off

    ReplyDelete
  4. i am unable to find slapd.conf please tell me the location i followed above steps for installing ldap

    ReplyDelete