Prerequisites
Configure the LD_LIBRARY_PATH environment variable to include Java libraries:
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/i386:$JAVA_HOME/jre/lib/i386/server:$LD_LIBRARY_PATH
or create symbolic links:
cd /usr/lib ln -s $JAVA_HOME/jre/lib/i386/libjava.so ln -s $JAVA_HOME/jre/lib/i386/libverify.so ln -s $JAVA_HOME/jre/lib/i386/server/libjvm.so
Install the following RPM packages:
- cyrus-sasl-devel (optional)
- db4-devel
- gcc
- gdbm-devel (optional)
- krb5-devel (optional)
- libtool-ltdl-devel
- openssl-devel (optional)
- pam-devel (optional)
- unixODBC-devel (optional)
- bind-libbind-devel (optional)
Installing OpenLDAP Source Code
Get the source code from CVS. First login as anonymous with password OpenLDAP:
cvs -d :pserver:anonymous@cvs.openldap.org:/repo/OpenLDAP login
Then checkout the files:
cvs -d :pserver:anonymous@cvs.openldap.org:/repo/OpenLDAP -z 3 checkout -P -r <tag> openldap
Currently the supported tags are:
- OPENLDAP_REL_ENG_2_2_29
- OPENLDAP_REL_ENG_2_3_19
- OPENLDAP_REL_ENG_2_3_24
We will refer the OpenLDAP's source directory as OPENLDAP_SRC.
Alternatively, download the source RPM (openldap-x.x.x.src.rpm) from Fedora
, install it the execute:
cd /usr/src/redhat/SPECS rpm -bb openldap.spec
Patching OpenLDAP
Apply the appropriate patch:
cd JAVA_BACKEND_HOME ant -Dopenldap.src=... -Dopenldap.version=... patch
The "openldap.src" should point to OPENLDAP_SRC. The "openldap.version" should be the version number, e.g. 2.2.26.
Building OpenLDAP
Go to OpenLDAP's source directory.
cd OPENLDAP_SRC
To configure static compilation:
./configure --enable-java [other options]
To configure Java Backend as a module:
./configure --enable-java=mod --enable-modules [other options]
Build OpenLDAP:
make depend make
Installing OpenLDAP
Run the following command to install OpenLDAP:
make install
By default the slapd will be installed under /usr/local/libexec directory, and the slapd.conf will be installed under /usr/local/etc/openldap.
To run slapd:
cd /usr/local/libexec ./slapd -d 65535
