In the openLDAP installation and configuration README I followed they were asked to install the latest version of Berkely DB. At the moment I was installing it was 4.8.26 but after installing it I was unable to up the server. [ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) ] error was appeared. Finally I found the reason and it worked for me. In the LDAP release notes it is stated that the most stable version of Berkely DB for openldap_2.4.21 is db-4.7.25. Then I install this version and reconfigure the LDAP server. It worked fine. Here are the full steps that I have followed. I installed it on top of the SSL.
Installing Berkely db-4.7.25.
Download the compatible version (for your particular LDAP version) of Berkeley DB f rom http://www.sleepycat.com/download/index.shtml
gzip -d db-4.7.25.tar.gz
tar xvf db-4.7.25.tar
cd db-4.7.25
../dist/configure –prefix=/usr/local/
make
make install
Installing TSL(I install openSSL)
Download the compatible version of OpenSSL from http://www.openssl.org/source/
gzip –d openssl-version.tar.gz
tar xfv openssl-version.tar
cd openssl-version
./config shared –openssldir=/usr/local
make
make install
Installating openLDAP
Download the particular version of openLDAP from http://www.openldap.org/software/download/
tar xfv openldap-version.tar
cd openldap-version
./configure
make depend
make
make install
Now we should be able to up and run the LDAP server successfully.
Start the server: /usr/local/libexec/slapd
NOTE: (possible error at this point) :/usr/local/libexec/slapd: error while loading sharedlibraries: libdb-4.8.so: cannot open shared object file: No such file or directory
If so enter the following command or add it to bash_profile.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
Stop the server: kill -INT `cat /usr/local/var/run/slapd.pid`
To check whether the server is correctly configured and running use ldapserch as follows.
ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
No comments:
Post a Comment