Building OpenLdap on 10.3

Since OS X comes with OpenLDAP already installed, you really might not need to do this, but I wanted to get to know the software better and was looking for a way to get a "standard" ldap service running on an OS X server (the idea being to avoid mucking up the OpenDirectory configuration by staying out of it's way). I'm just getting started with this myself, so be careful! Also, this is a plain vanilla installation of ldap, with minimal options.

This procedure is mainly derived from 4AM-Media's FAQ entry on installing OpenLDAP, many thanks to Michael Bartosh for putting up the basic information. This installation puts a copy of OpenLDAP in /usr/local.

Finally, before starting you should take a look at the OpenLDAP Admin guide, this will make more sense if you look through that a bit.

Install the Berkeley DB backend

It seems that typically OpenLDAP uses the Berkeley database as the backend, at the time of this writing db-4.2.52 is the current version. You can download it via safari or other browser from Sleepy Cat, also make sure to get the patches.

Ok, now the Berkeley DB is installed, on to the OpenLDAP.

Install OpenLDAP

I downloaded openldap-2.1.30 via safari from the OpenLDAP site, and double clicked to unpack the tarred files.

Basic Configuration and Starting the service

The next step is to edit /usr/local/etc/openldap/slapd.conf to suit your initial needs. The file itself is well commented, and the defaults for most settings work fine.

Once you've gotten a basic slapd.conf file set up, you'll want to try to test it by running slapd in test mode:

sudo /usr/local/libexec/slapd -t 
I'm using the phpldapadmin software to play with the base configuration.....