1999-10-01 00:57:45 +08:00
|
|
|
# $OpenLDAP$
|
2000-07-23 02:59:40 +08:00
|
|
|
# Copyright 1999-2000, The OpenLDAP Foundation, All Rights Reserved.
|
1999-04-24 07:41:45 +08:00
|
|
|
# COPYING RESTRICTIONS APPLY, see COPYRIGHT.
|
2000-08-09 13:20:00 +08:00
|
|
|
H1: Building and Installing OpenLDAP Software
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
This chapter details how to build and install the {{ORG:OpenLDAP}}
|
|
|
|
Software package including {{slapd}}(8), the stand-alone LDAP
|
|
|
|
daemon and {{slurpd}}(8), the stand-alone update replication daemon.
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 12:28:44 +08:00
|
|
|
Building and installing OpenLDAP requires several steps: installing
|
|
|
|
prerequisite software, configuring OpenLDAP itself, making, and finally
|
|
|
|
installing. The following sections describe this process in detail.
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-24 07:23:16 +08:00
|
|
|
In case you haven't already obtained OpenLDAP it is available at
|
|
|
|
the following location:
|
|
|
|
{{URL: ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release.tgz}}.
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
The {{ORG[expand]OLP}} also maintains an extensive site
|
|
|
|
({{URL:http://www.OpenLDAP.org/}}) on the World Wide Web. The site
|
|
|
|
makes available a number of resources which you may utilize to
|
|
|
|
properly install OpenLDAP Software. This includes:
|
|
|
|
|
2000-08-11 03:20:11 +08:00
|
|
|
!block table; align=Center; coltags="N,URL"; \
|
|
|
|
title="Table 4.1: Other OpenLDAP resources"
|
2000-08-09 14:48:33 +08:00
|
|
|
Resource URL
|
2000-08-24 07:23:16 +08:00
|
|
|
Document Catalog http://www.OpenLDAP.org/doc/
|
2000-08-10 06:57:48 +08:00
|
|
|
Frequently Asked Questions http://www.OpenLDAP.org/faq/
|
|
|
|
Issue Tracking System http://www.OpenLDAP.org/its/
|
|
|
|
Mailing Lists http://www.OpenLDAP.org/lists/
|
|
|
|
Software Pages http://www.OpenLDAP.org/software/
|
|
|
|
Support Page http://www.OpenLDAP.org/support/
|
2000-08-09 14:48:33 +08:00
|
|
|
!endblock
|
|
|
|
|
2000-08-09 12:28:44 +08:00
|
|
|
H2: Prerequisite software
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-24 07:23:16 +08:00
|
|
|
OpenLDAP Software relies upon a number of software packages distributed
|
|
|
|
by third parties. Depending on the features you intend to use,
|
|
|
|
you may have to download and install a number of additional
|
|
|
|
software packages. This section details commonly needed third party
|
|
|
|
software packages you might have to install. Note that some of
|
|
|
|
these third party packages may depend on additional software
|
|
|
|
packages. Install each package per installation instructions
|
|
|
|
provided with it.
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
H3: {{TERM[expand]TLS}}
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
OpenLDAP clients and servers require installation of {{PRD:OpenSSL}}
|
|
|
|
{{TERM:TLS}} libraries to provide {{TERM[expand]TLS}} services. Though
|
2000-08-09 13:20:00 +08:00
|
|
|
some operating systems may provide these libraries as part of the
|
|
|
|
base system or as an optional software component, OpenSSL often
|
|
|
|
requires separate installation.
|
|
|
|
|
|
|
|
OpenSSL is available from {{URL: http://www.openssl.org/}}.
|
|
|
|
|
|
|
|
OpenLDAP will not be fully LDAPv3 compliant unless OpenLDAP's
|
2000-08-10 06:57:48 +08:00
|
|
|
{{EX:configure}} detects a usable OpenSSL installation.
|
2000-08-09 13:20:00 +08:00
|
|
|
|
2000-08-14 03:48:56 +08:00
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
H3: Kerberos Authentication Services
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-14 03:48:56 +08:00
|
|
|
OpenLDAP clients and servers support Kerberos-based authentication
|
2000-08-10 06:57:48 +08:00
|
|
|
services.
|
2000-08-14 03:48:56 +08:00
|
|
|
In particular, OpenLDAP supports {{TERM:SASL}}/{{TERM:GSSAPI}}
|
|
|
|
authentication mechanism using either {{PRD:Heimdal}} or
|
|
|
|
{{PRD:MIT Kerberos}} V packages.
|
|
|
|
If you desire to use Kerberos-based SASL/GSSAPI authentication,
|
|
|
|
you should install either Heimdal or MIT Kerberos V.
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
Heimdal Kerberos is available from {{URL:http://www.pdc.kth.se/heimdal/}}.
|
|
|
|
MIT Kerberos is available from {{URL:http://web.mit.edu/kerberos/www/}}.
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
Use of strong authentication services, such as those provided by
|
|
|
|
Kerberos, is highly recommended.
|
|
|
|
|
2000-08-14 03:48:56 +08:00
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
H3: {{TERM[expand]SASL}}
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-21 00:19:52 +08:00
|
|
|
OpenLDAP clients and servers require installation of {{PRD:Cyrus}}'s
|
|
|
|
{{PRD:SASL}} libraries to provide {{TERM[expand]SASL}} services. Though
|
2000-08-11 01:49:29 +08:00
|
|
|
some operating systems may provide this library as part of the
|
2000-08-09 13:20:00 +08:00
|
|
|
base system or as an optional software component, Cyrus SASL
|
|
|
|
often requires separate installation.
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-21 00:19:52 +08:00
|
|
|
Cyrus SASL is available from
|
|
|
|
{{URL:http://asg.web.cmu.edu/sasl/sasl-library.html}}.
|
2000-08-10 06:57:48 +08:00
|
|
|
Cyrus SASL will make use of OpenSSL and Kerberos/GSSAPI libraries
|
|
|
|
if preinstalled.
|
2000-08-09 13:20:00 +08:00
|
|
|
|
|
|
|
OpenLDAP will not be fully LDAPv3 compliant unless OpenLDAP's
|
|
|
|
configure detects a usable Cyrus SASL installation.
|
|
|
|
|
2000-08-14 03:48:56 +08:00
|
|
|
|
2000-08-09 13:20:00 +08:00
|
|
|
H3: Database software
|
|
|
|
|
|
|
|
OpenLDAP's {{slapd}}(8) primary database backend, {{TERM:LDBM}},
|
|
|
|
requires that a compatible database package for entry storage. LDBM
|
2000-08-09 14:48:33 +08:00
|
|
|
is compatible with {{ORG[expand]Sleepy}}'s {{PRD:BerkeleyDB}} (recommended)
|
|
|
|
or the {{ORG[expand]FSF}}'s {{PRD:GNU}} Database Manager ({{PRD:GDBM}}).
|
2000-08-09 13:20:00 +08:00
|
|
|
If neither of these packages are available at configure time,
|
|
|
|
you will not be able build slapd(8) with primary database backend.
|
|
|
|
|
|
|
|
Your operating system may provide one of these two packages in
|
|
|
|
in base system or as an optional software component. You may
|
|
|
|
need may need to obtain the software and install it yourself.
|
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
{{PRD:BerkeleyDB}} is available from {{ORG[expand]Sleepy}}'s
|
|
|
|
download page {{URL: http://www.sleepycat.com/download.html}}.
|
|
|
|
There are several versions available. At the time of this writing,
|
2000-08-10 06:57:48 +08:00
|
|
|
the latest release, version 3.1, is recommended.
|
2000-08-09 13:20:00 +08:00
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
{{PRD:GDBM}} is available from {{ORG:FSF}}'s download site
|
|
|
|
{{URL: ftp://ftp.gnu.org/pub/gnu/gdbm/}}.
|
2000-08-09 13:20:00 +08:00
|
|
|
At the time of this writing, version 1.8 is the latest release.
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-14 03:48:56 +08:00
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
H3: Threads
|
|
|
|
|
|
|
|
OpenLDAP is designed to take advantage of threads. OpenLDAP
|
|
|
|
supports POSIX {{pthreads}}, Mach {{CThreads}}, and a number of
|
|
|
|
other varieties. {{EX:configure}} will complain if it cannot
|
|
|
|
find a suitable thread subsystem. If this occurs, please
|
|
|
|
consult the {{F:Software|Installation|Platform Hints}} section
|
|
|
|
of the OpenLDAP FAQ {{URL: http://www.openldap.org/faq/}}.
|
|
|
|
|
2000-08-14 03:48:56 +08:00
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
H3: TCP Wrappers
|
|
|
|
|
|
|
|
{{slapd}}(8) supports TCP wrappers (IP level access control filters)
|
|
|
|
if preinstalled. Use of TCP wrappers or other IP level access
|
2000-08-11 02:39:32 +08:00
|
|
|
filters (such as those provided by a IP-level firewall) is recommended
|
2000-08-10 06:57:48 +08:00
|
|
|
for servers containing non-public information.
|
|
|
|
|
|
|
|
|
2000-08-12 14:35:08 +08:00
|
|
|
H2: Running configure
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 13:20:00 +08:00
|
|
|
If you haven't already done so, extra the distribution for the
|
|
|
|
compressed archive file and change directory to the top of the
|
|
|
|
distribution:
|
|
|
|
|
2000-08-09 12:28:44 +08:00
|
|
|
.{{EX:gunzip -c openldap-VERSION.tgz | tar xf -}}
|
|
|
|
.{{EX:cd openldap-VERSION}}
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 13:20:00 +08:00
|
|
|
Replacing {{EX:VERSION}} with the appropriate version string.
|
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
Note: If you intend to build OpenLDAP for multiple platforms from a
|
|
|
|
single source tree you should consult the {{F: INSTALL}} file in the
|
|
|
|
top level distribution directory before running {{EX:configure}}.
|
|
|
|
|
2000-08-09 13:20:00 +08:00
|
|
|
Now you should probably run the {{EX:configure}} script with the
|
|
|
|
{{EX:--help}} option.
|
2000-08-09 12:28:44 +08:00
|
|
|
This will give you a list of options that you can change when building
|
|
|
|
OpenLDAP. Many of the features of OpenLDAP can be enabled or disabled
|
|
|
|
using this method. Please see the appendix for a more detailed list
|
|
|
|
of configure options, and their usage.
|
|
|
|
.{{EX:./configure --help}}
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
The {{EX:configure}} script will also look at certain environment variables
|
2000-08-09 12:28:44 +08:00
|
|
|
for certain settings. These environment variables are:
|
2000-08-09 14:48:33 +08:00
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
!block table; align=Center; coltags="EX,N"; title="Table 4.1: Environment Variables"
|
2000-08-09 14:48:33 +08:00
|
|
|
Variable Description
|
2000-08-10 06:57:48 +08:00
|
|
|
CC Specify alternative C Compiler
|
|
|
|
CFLAGS Specify additional compiler flags
|
|
|
|
CPPFLAGS Specify C Preprocessor flags
|
|
|
|
LDFLAGS Specify linker flags
|
|
|
|
LIBS Specify additional libraries
|
2000-08-09 12:28:44 +08:00
|
|
|
!endblock
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 12:28:44 +08:00
|
|
|
Now run the configure script with any desired configure options or
|
|
|
|
environment variables.
|
2000-08-09 14:48:33 +08:00
|
|
|
|
2000-08-10 13:23:38 +08:00
|
|
|
> [[env] settings] ./configure [options]
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 12:28:44 +08:00
|
|
|
As an example, lets assume that we want a copy of OpenLDAP configured to use the
|
|
|
|
LDBM backend, and the shell backend. The LDBM backend is turned on by default, so we don't need to do anything special to enable it.
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 12:28:44 +08:00
|
|
|
Additionally, we've installed the BerkeleyDB database package.
|
2000-08-09 14:48:33 +08:00
|
|
|
{{EX:configure}} is smart enough to use BerkeleyDB automatically
|
|
|
|
if it can find it, but BerkeleyDB is installed by default in a
|
|
|
|
place {{EX:configure}} won't look at automatically. BerkeleyDB
|
|
|
|
is usually installed in {{F:/usr/local/BerkeleyDB.3.1}} (assuming
|
|
|
|
that version 3.1 is being used.)
|
|
|
|
|
|
|
|
The following example shows how to run {{EX:configure}} and specify where to
|
2000-08-11 01:49:29 +08:00
|
|
|
find BerkeleyDB and turn on the DNS-SRV backend. The example should be
|
|
|
|
entered on a single line (it has been split onto separate lines for clarity.)
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-10 13:23:38 +08:00
|
|
|
> env CPPFLAGS="-I/usr/local/BerkeleyDB.3.1/include" \
|
|
|
|
> LDFLAGS="-L/usr/local/BerkeleyDB.3.1/lib" \
|
|
|
|
> ./configure --enable-dnssrv
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
Note: Some shells, such as those derived from the Bourne {{sh}}(1),
|
2000-08-09 14:48:33 +08:00
|
|
|
do not require use of the {{env}}(1) command. In some cases, environmental
|
|
|
|
variables have to be specified using alternative syntaxes.
|
1999-05-03 09:19:22 +08:00
|
|
|
|
2000-08-09 12:28:44 +08:00
|
|
|
For more information on backends see the chapter on configuration.
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
The {{EX:configure}} script will normally auto-detect appropriate settings.
|
2000-08-09 12:28:44 +08:00
|
|
|
If you have problems at this stage, consult any platform specific
|
2000-08-09 14:48:33 +08:00
|
|
|
hints and check your {{EX:configure}} options if any.
|
1999-05-03 09:19:22 +08:00
|
|
|
|
2000-08-14 03:48:56 +08:00
|
|
|
|
2000-08-09 12:28:44 +08:00
|
|
|
H2: Building the Software
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
Once you have run the {{EX:configure}} script the last line of output
|
|
|
|
should be:
|
2000-08-10 13:23:38 +08:00
|
|
|
> Please "make depend" to build dependencies
|
1999-05-03 09:19:22 +08:00
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
If the last line of output does not match, {{EX:configure}} has failed.
|
2000-08-11 01:49:29 +08:00
|
|
|
You should not proceed until {{EX:configure}} completes successfully.
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
To build dependencies, run:
|
2000-08-10 13:23:38 +08:00
|
|
|
> make depend
|
1999-05-03 09:19:22 +08:00
|
|
|
|
2000-08-10 06:57:48 +08:00
|
|
|
Now build the software, this step will actually compile OpenLDAP.
|
2000-08-10 13:23:38 +08:00
|
|
|
> make
|
1999-04-24 07:00:44 +08:00
|
|
|
|
|
|
|
You should examine the output of this command carefully to make sure
|
|
|
|
everything is built correctly. Note that this command builds the LDAP
|
2000-08-09 14:48:33 +08:00
|
|
|
libraries and associated clients as well as {{slapd}}(8) and {{slurpd}}(8).
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-14 03:48:56 +08:00
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
H2: Testing the Software
|
1999-04-24 07:00:44 +08:00
|
|
|
|
|
|
|
Once the software has been properly configured and successfully
|
2000-08-09 14:48:33 +08:00
|
|
|
made, you should run the test suite to verify the build.
|
|
|
|
|
2000-08-10 13:23:38 +08:00
|
|
|
> make test
|
2000-08-09 14:48:33 +08:00
|
|
|
|
|
|
|
The test will run a number of tests.
|
|
|
|
|
2000-08-14 03:48:56 +08:00
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
H2: Installing the Software
|
|
|
|
|
|
|
|
One you have successfully tested the software, you are ready to install it.
|
|
|
|
You will need to have write permission
|
2000-08-09 12:28:44 +08:00
|
|
|
to the installation directories you specified when you ran configure.
|
2000-08-09 13:20:00 +08:00
|
|
|
By default OpenLDAP is installed in {{F:/usr/local}}. If you changed this
|
2000-08-09 14:48:33 +08:00
|
|
|
setting with the {{F:--prefix}} configure option, it will be installed
|
2000-08-09 12:28:44 +08:00
|
|
|
in the location you provided.
|
|
|
|
|
2000-08-09 14:48:33 +08:00
|
|
|
Typically, the installation is done as {{root}}. From the top level OpenLDAP
|
|
|
|
source directory, type:
|
1999-04-24 07:00:44 +08:00
|
|
|
|
2000-08-10 13:23:38 +08:00
|
|
|
> make install
|
1999-04-24 07:00:44 +08:00
|
|
|
|
|
|
|
You should examine the output of this command carefully to make sure
|
2000-08-09 12:28:44 +08:00
|
|
|
everything is installed correctly. You will find the configuration files
|
2000-08-24 07:23:16 +08:00
|
|
|
for slapd in {{F:/usr/local/etc/openldap}} by default. See the
|
|
|
|
{{SECT:The slapd Configuration File}} chapter for additional information.
|
1999-04-24 07:00:44 +08:00
|
|
|
|