Labels

new blog 2.0

2007/10/22

0x01. [LPIC-301] LDAP - Obtaining and building OpenLDAP

0. Obtaining
According to OpenLDAP Admin Guide Version 2.3, you can obtain the software from the following locations:
HTTP: http://www.openldap.org/software/download/
FTP: ftp://ftp.openldap.org/pub/OpenLDAP

You can get the software in two main series: release and stable. What is the difference between "release" and "stable" versions? section on the projects website states:

The term "release", as used on the download web page [...] refers to the lastest version of the OpenLDAP Software available for "general use".
The term "stable" refers to the last "general use" release that has demonstrated itself as being reliable in real world environments.

Before extracting the package, we should consider what are the requirements for the openLDAP. There is a number of packages that should be installed prior to building openLDAP. If you want to have an LDAPv3 compilant server then you should not forget about the following packages:

I presume from now on, that you have already downloaded the tarball, checked the md5sum and extracted the software.

1. Configuring
It's always a good idea to start by reading the INSTALL file. I leave you to it. Here we will focus on the configure script, more precisely on it's optional-packages and SLAPD switches.
The script gives us a number of options for customization. It accepts the options in two ways:
- parameters like --with-tls, --enable-slurpd
- CC, CFLAGS, CPPFLAGS, LDFLAGS, LIBS, PATH can be accepted as environmental variables. We won't use this way here.

You use 'configure' to enable or disable features in your OpenLDAP build. The general rule for enabling a particular feature is to add --enable-FEATURE to the command prompt before hitting enter. There is a similar rule for disabling functionality. Type --disable-FEATURE or --enable-FEATURE=no in order to disable FEATURE.

The following features are enabled by default: debug, proctitle, slapd, cleartext, bdb, hdb, monitor, relay, syncprov.

If the system detects support for the following features, they are activated automatically: syslog, ipv6, local, rewrite, ldbm-api, ldbm-type, slurpd, cyrus-sasl, fetch, threads, tls, yielding-select, mp, odbc

For a little more detailed information try ./configure --help

2. Building
The whole build process takes four steps.
I. Configuration by running ./configure script, talked
II. Building dependencies by doing make depend
III. Building the executables by running make
IIIa. Optionally, you can run a test - make test. If you fail, review your configuration.
IV. Installing the software with make install with root privileges.

That's it.

No comments: