← All guides
OpenLDAP
OpenLDAP is the reference open-source LDAP directory server; the project's own admin guide documents installing it by compiling slapd from source rather than via a packaged installer.
This guide is synthesized from OpenLDAP's own official documentation, linked above — always cross-check exact package/version names there before running these commands on a production server, since distro and project versions move over time.
1Download and extract the source
gunzip -c openldap-VERSION.tgz | tar xvfB -cd openldap-VERSION2Configure, build, and test
./configuremake dependmakemake test3Install
su root -c 'make install'Installs under /usr/local by default.
4Load the default configuration and start slapd
su root -c /usr/local/sbin/slapadd -n 0 -F /usr/local/etc/slapd.d -l /usr/local/etc/openldap/slapd.ldifsu root -c /usr/local/libexec/slapd -F /usr/local/etc/slapd.dEdit slapd.ldif with your own domain/database settings before loading it.
5Verify the server responds
ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts