Dashboard > Penrose 1.0 > ... > Building Java Backend > Building OpenLDAP Server on Mac OS X
Building OpenLDAP Server on Mac OS X
Added by Endi S. Dewata, last edited by Endi S. Dewata on Dec 19, 2006  (view change)
Labels: 
(None)


Prerequisites

Login as root user or use the sudo command where appropriate.

Download and install the latest Xcode.

Download and install the latest DarwinPorts. Run self update:

port -d selfupdate

Installing OpenLDAP Source Code

Execute the following command to download OpenLDAP source code:

port extract openldap

Run the following command to display the OpenLDAP port directory:

port dir openldap

We will refer to this directory as OPENLDAP_PORT. The OpenLDAP source code is located in OPENLDAP_PORT/work/openldap-2.2.28.

Patching OpenLDAP

Edit OPENLDAP_PORT/Portfile and add --enable-java parameter:

configure.args  --mandir=${prefix}/share/man \
                --localstatedir=${prefix}/var/run \
                --with-cyrus-sasl \
                --with-tls \
                --enable-java \
                --enable-wrappers

Apply the patch:

cd JAVA_BACKEND_HOME
ant -Dopenldap.src=OPENLDAP_PORT/work/openldap-2.2.28 -Dopenldap.version=2.2.28 patch

Building OpenLDAP

Run the following command to build OpenLDAP:

port build openldap

Installing OpenLDAP

Run the following command to install OpenLDAP:

port install [-k] openldap

You can specify -k option to retain the source code after installation.

By default the slapd will be installed under /opt/local/libexec directory, and the slapd.conf will be installed under /opt/local/etc/openldap.

Create this directory:

mkdir -p /opt/local/var/run/openldap-data

To run slapd:

cd /opt/local/libexec
./slapd -d 65535

References

Site running on a free Atlassian Confluence Open Source Project License granted to Safehaus. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators