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.

Serf library installation

The Serf package contains a C-based HTTP client library built upon the Apache Portable Runtime (APR) library. It is used so that https URL can be accessed using svn.

Steps to install Serf:



First we need to download & install scons

(1) wget http://downloads.sourceforge.net/scons/scons-2.3.0.tar.gz
(2) tar xzvf scons-2.3.0.tar.gz
(3) cd scons-2.3.0
(4) python setup.py install --standard-lib

This install scons (/usr/bin/scons-2.3.0)


Install apr-1.5.0 & apr-util 1.5.3 ( in apar-util, do not use crypto option until you have openssl 1.0.1g)

Then navigate to: /usr/bin

ln -s /custom/apr-1.5.0/bin/apr-1-config apr-1-config
ln -s /custom/apr-util-1.5.3/bin/apu-1-config apu-1-config

Serf install steps:


(1) Download (HTTP): https://serf.googlecode.com/svn/src_releases/serf-1.3.4.tar.bz2
(2) tar xjvf serf-1.3.4.tar.bz2
(3) cd serf-1.3.4
(4) sed -i "/Append/s:RPATH=libdir,::"   SConstruct
sed -i "/Default/s:lib_static,::"    SConstruct
sed -i "/Alias/s:install_static,::"  SConstruct
/usr/bin/scons-2.3.0 PREFIX=/custom/serf/1.3.4
/usr/bin/scons-2.3.0 PREFIX=/custom/serf/1.3.4 install

cd /usr/lib64

ln -s /custom/serf/1.3.4/lib/libserf-1.so.1.3.0 libserf-1.so.1