2. Compile and Optimize

Move into the new OpenLDAP directory and type the following commands on your terminal:

It is important to note that you can configure three different kinds of backend databases with LDAP.

  1. A high-performance, disk-based database called LDBM

  2. A database interface to arbitrary UNIX commands or shell scripts calledd SHELL

  3. A simple password file database named PASSWD

Now, we must compile and install OpenLDAP in the server:

                 [root@deep openldap-1.2.10]# make depend
                 [root@deep openldap-1.2.10]# make
                 [root@deep openldap-1.2.10]# cd tests/
                 [root@deep tests]# make
                 [root@deep tests]# cd ..
                 [root@deep openldap-1.2.10]# make install
               

The make command under /test subdirectory will do some important tests to verify the functionality of your LDAP server before the installation. If some tests fails, you'll need to fixes the problems before continuing the installation.

               [root@deep openldap-1.2.10]# install -d -m 700 /var/ldap
               [root@deep openldap-1.2.10]# echo localhost > /etc/openldap/ldapserver
               [root@deep openldap-1.2.10]# strip /usr/lib/liblber.so.1.0.0
               [root@deep openldap-1.2.10]# strip /usr/lib/libldap.so.1.0.0
               [root@deep openldap-1.2.10]# strip /usr/lib/libldap.a
               [root@deep openldap-1.2.10]# strip /usr/lib/liblber.a
               [root@deep openldap-1.2.10]# strip /usr/sbin/in.xfingerd
               [root@deep openldap-1.2.10]# strip /usr/sbin/go500
               [root@deep openldap-1.2.10]# strip /usr/sbin/go500gw
               [root@deep openldap-1.2.10]# strip /usr/sbin/mail500
               [root@deep openldap-1.2.10]# strip /usr/sbin/rp500
               [root@deep openldap-1.2.10]# strip /usr/sbin/rcpt500
               [root@deep openldap-1.2.10]# strip /usr/sbin/fax500
               [root@deep openldap-1.2.10]# strip /usr/sbin/slapd
               [root@deep openldap-1.2.10]# strip /usr/sbin/slurpd
               [root@deep openldap-1.2.10]# strip /usr/sbin/ldif
               [root@deep openldap-1.2.10]# strip /usr/sbin/ldif2ldbm
               [root@deep openldap-1.2.10]# strip /usr/sbin/ldif2index
               [root@deep openldap-1.2.10]# strip /usr/sbin/ldif2id2entry
               [root@deep openldap-1.2.10]# strip /usr/sbin/ldif2id2children
               [root@deep openldap-1.2.10]# strip /usr/sbin/ldbmcat
               [root@deep openldap-1.2.10]# strip /usr/sbin/ldbmtest
               [root@deep openldap-1.2.10]# strip /usr/sbin/centipede
               [root@deep openldap-1.2.10]# strip /usr/bin/ud
               [root@deep openldap-1.2.10]# strip /usr/bin/ldapadd
               [root@deep openldap-1.2.10]# strip /usr/bin/ldapsearch
               [root@deep openldap-1.2.10]# strip /usr/bin/ldapmodify
               [root@deep openldap-1.2.10]# strip /usr/bin/ldapmodrdn
               [root@deep openldap-1.2.10]# strip /usr/bin/ldappasswd
               [root@deep openldap-1.2.10]# strip /usr/bin/ldapdelete
             

Please don't forget to cleanup later:

                 [root@deep] /# cd /var/tmp
                 [root@deep ]/tmp# rm -rf openldap-version/ openldap-version.tgz
               

The rm command will remove all the source files we have used to compile and install OpenLDAP. It will also remove the OpenLDAP compressed archive from the /var/tmp directory.