]> git.sur5r.net Git - openldap/blob - doc/guide/admin/install.sdf
bfac779de4924fbb9a3d7968dc0b8e88da32996f
[openldap] / doc / guide / admin / install.sdf
1 # $OpenLDAP$
2 # Copyright 1999-2000, The OpenLDAP Foundation, All Rights Reserved.
3 # COPYING RESTRICTIONS APPLY, see COPYRIGHT.
4 H1: Building and Installing OpenLDAP Software
5
6 This chapter details how to build and install the OpenLDAP Software
7 package including {{slapd}}(8), the stand-alone LDAP daemon and
8 {{slurpd}}(8), the stand-alone update replication daemon.
9
10 Building and installing OpenLDAP requires several steps: installing
11 prerequisite software, configuring OpenLDAP itself, making, and finally
12 installing.  The following sections describe this process in detail.
13
14 In case you haven't already obtained OpenLDAP it is available at the following
15 location: {{URL: ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release.tgz}}
16
17 The OpenLDAP Project also maintains an extensive site on the World Wide Web.
18 The site contains the latest OpenLDAP news, release announcements, and 
19 pointers to many other resources.  You can access the site at:
20 {{URL: http://www.OpenLDAP.org/}}
21
22 H2: Prerequisite software
23
24 OpenLDAP relies a number of software packages distributed by third
25 parties.  Depending on the features you intend to use, you may have
26 to download and install a number of additional software packages.
27 This section details commonly needed third party software packages
28 you might have to install.  Note that some of these third party
29 packages may depend on additional software packages.  Install each
30 package per installation instructions provided with it.
31
32 H3: TLS Software
33
34 OpenLDAP clients and servers require installation of OpenSSL TLS
35 libraries to provide {{TERM[expand]TLS}} services.  Though
36 some operating systems may provide these libraries as part of the
37 base system or as an optional software component, OpenSSL often
38 requires separate installation.
39
40 OpenSSL is available from {{URL: http://www.openssl.org/}}.
41
42 OpenLDAP will not be fully LDAPv3 compliant unless OpenLDAP's
43 configure detects a usable OpenSSL installation.
44
45 H3: Kerberos Software
46
47 OpenLDAP clients and servers support Kerberos based authentication
48 services.  In particular, OpenLDAP supports SASL/GSSAPI based
49 authentication using either Heimdal or MIT Kerberos V packages.
50 If you desire to use Kerberos based authentication, you should
51 install either Heimdal or MIT Kerberos V.
52
53 Heimdal Kerberos is available from {{http://}}.
54 MIT Kerberos is available from {{http://}}.
55
56 H3: SASL Software
57
58 OpenLDAP clients and servers require installation of Cyrus SASL
59 libraries to provide {{TERM[expand]SASL}} services.  Though
60 some operating sytems may provide this library as part of the
61 base system or as an optional software component, Cyrus SASL
62 often requires separate installation.
63
64 Cyrus SASL is available from {{URL:: }}.   Cyrus SASL will
65 make use of Kerberos libraries if preinstalled.
66
67 OpenLDAP will not be fully LDAPv3 compliant unless OpenLDAP's
68 configure detects a usable Cyrus SASL installation.
69
70 H3: Database software
71
72 OpenLDAP's {{slapd}}(8) primary database backend, {{TERM:LDBM}},
73 requires that a compatible database package for entry storage.  LDBM
74 is compatible with Sleepycat Software's BerkeleyDB (recommended)
75 or the Free Software Foundation's GNU Database Manager (GDBM).
76 If neither of these packages are available at configure time,
77 you will not be able build slapd(8) with primary database backend.
78
79 Your operating system may provide one of these two packages in
80 in base system or as an optional software component.  You may
81 need may need to obtain the software and install it yourself.
82
83 BerkeleyDB is available from Sleepycat's web site
84 {{URL: http://www.sleepycat.com/download.html}}.  There are
85 several versions available.  At the time of this writing,
86 version 3.1, the latest release, is recommended. 
87
88 GDBM is available from GNU's ftp {{URL: ftp://ftp.gnu.org/pub/gnu/gdbm/}}
89 At the time of this writing, version 1.8 is the latest release.
90
91 H2: Configuring OpenLDAP
92
93 If you haven't already done so, extra the distribution for the
94 compressed archive file and change directory to the top of the
95 distribution:
96
97 .{{EX:gunzip -c openldap-VERSION.tgz | tar xf -}}
98 .{{EX:cd openldap-VERSION}}
99
100 Replacing {{EX:VERSION}} with the appropriate version string.
101
102 Now you should probably run the {{EX:configure}} script with the
103 {{EX:--help}} option.
104 This will give you a list of options that you can change when building
105 OpenLDAP.  Many of the features of OpenLDAP can be enabled or disabled
106 using this method.  Please see the appendix for a more detailed list
107 of configure options, and their usage.
108 .{{EX:./configure --help}}
109
110 The configure script will also look at certain environment variables
111 for certain settings.  These environment variables are:
112 !block table
113 Variable        Uses
114 CC              Sets which C Compiler to use (cc,gcc)
115 CFLAGS          What compiler flags to use
116 CPPFLAGS        What C Preprocessor flags to use
117 LDFLAGS         What flags to give the linker
118 LIBS            What libraries to include
119 !endblock
120
121 Now run the configure script with any desired configure options or
122 environment variables.
123 .{{EX: [[env] settings] ./configure [options] }}
124
125 As an example, lets assume that we want a copy of OpenLDAP configured to use the
126 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.
127
128 Additionally, we've installed the BerkeleyDB database package.  
129 Configure is smart enough to use BerkeleyDB automaticly if it can find it, but
130 BerkeleyDB is installed by default in a place configure won't look at 
131 automaticly.  BerkeleyDB is usually installed in /usr/local/BerkeleyDB.3.1
132 (assuming that version 3.1 is being used.) 
133
134  The following example shows how to run configure and specify where to 
135 find BerkeleyDB and turn on the shell backend.  The example should be 
136 entered on a single line (it has been split onto seperate lines for clarity.)
137
138 If you are using csh (or any shell with similar syntax, ie tcsh.)
139 .{{EX: env CPPFLAGS="-I/usr/local/BerkeleyDB.3.1/include" LDFLAGS="-L/usr/local/BerkeleyDB.3.1/lib" ./configure --enable-shell}}
140
141 If you are using sh (or any shell with similar syntax, ie bash,ksh,etc.)
142 .{{EX: CPPFLAGS="-I/usr/local/BerkeleyDB.3.1/include" LDFLAGS="-L/usr/local/BerkeleyDB.3.1/lib" ./configure --enable-shell}}
143
144 For more information on backends see the chapter on configuration.
145
146 The configure script will normally auto-detect appropriate settings.
147 If you have problems at this stage, consult any platform specific
148 hints and check your configure options if any.
149
150 H2: Building the Software
151
152 Once you have run the configure script the last line of output should be:
153 .{{EX:Please "make depend" to build dependencies}}
154
155 If the last line of output does not match, configure has probably failed.  
156 You should not proceed until configure completes sucessfuly.
157
158 Now run make depend.
159 .{{EX: make depend}}
160
161 Now run make, this step will actually compile OpenLDAP.
162 .{{EX: make}}
163
164 You should examine the output of this command carefully to make sure
165 everything is built correctly. Note that this command builds the LDAP
166 libraries and associated clients as well as slapd and slurpd.
167
168 Note that the OpenLDAP distribution can support building for multiple
169 platforms from a single source tree. If you want to do this, consult the
170 {{EX: INSTALL}} file in the top level distribution directory.
171
172 H2: Installing the Software
173
174 Once the software has been properly configured and successfully
175 made, you are ready to install it. You will need to have write permission
176 to the installation directories you specified when you ran configure.
177 By default OpenLDAP is installed in {{F:/usr/local}}.  If you changed this
178 setting with the --prefix configure option, it will be installed
179 in the location you provided.
180
181 Typically, the installation is done as root. From the top level OpenLDAP
182 source directory, type
183
184 .{{EX: make install}}
185
186 You should examine the output of this command carefully to make sure
187 everything is installed correctly. You will find the configuration files
188 for slapd in {{F:/usr/local/etc/openldap}} by default.  See chapter 5 for more
189 information on the configuration files.
190
191