In the build mentioned in the previous section we compiled only the basics. This gets us what we need to run just the basics. But there are lots of OpenLDAP backends and overlays that can be useful (many of which are covered in this book). In cases where we want to build everything, typically it is best to compile OpenLDAP with module support, and compile all of the overlays and backends as modules. That way we can have all of the extras available, but only the ones needed (and configured in slapd.conf
) get loaded at runtime.
Note
Many of the additional backends and overlays have their own dependencies. For example, the Perl backend requires that the Perl libraries be installed. Most of the necessary dependencies are installed by default in Ubuntu. If you don't have the requisite libraries for a module, the configure
or make
programs will let you know what library is missing, and you will have to track down which package contains that library. For this process, you may find the package search on Debian's website useful (http://www.us.debian.org/distrib/packages#search_contents).
Since we are building OpenLDAP with modules, we will need to make sure that libtool
and the libtool header files are installed. In Ubuntu, it is not installed by default. Also, since the Perl backend (back_perl
) will be installed, we will need to install the Perl development package. You can install all of these with one command:
$ sudo apt-get install libtool libltdl3 libltdl3-dev libperl-dev
The libltdl3
library is usually installed by default, but the others are also needed to compile OpenLDAP with module support. Now we are ready to build OpenLDAP with modules.
To build OpenLDAP with all of the extra modules, we just need to use the correct flags with configure
:
$./configure --enable-dynamic --enable-modules --enable-backends=mod \ --enable-overlays=mod
To build everything we need only four flags. The first, --enable-dynamic
enables shared libraries. Second, --enable-modules
simply tells configure
that we want to use modules. The next two indicate what backends and overlays we want built: --enable-overlays
, which is set to mod
in order to build modules, and –enable-backends
(also set to mod
) to build all of the available backends.
Once configure
completes, you can run make
:
$ make depend && make && make test
This will build all the dependencies, then build OpenLDAP (and all of the modules), and then test everything. When you are ready to install, you can follow the instructions in the previous section.