]> git.sur5r.net Git - openldap/blob - doc/guide/admin/install.sdf
515b94e627f2b39a8b6afe65d51225bb7c4ded2a
[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
5 H1: Building and Installing OpenLDAP Software
6
7 This chapter details how to build and install the {{ORG:OpenLDAP}}
8 Software package including {{slapd}}(8), the stand-alone LDAP
9 daemon and {{slurpd}}(8), the stand-alone update replication daemon.
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
15 H2: Obtaining and Extracting the Software
16
17 You can obtain OpenLDAP Software from the project's download
18 page at {{URL: http://www.openldap.org/software/download/}} or
19 directly from the project's {{TERM:FTP}} service at
20 {{URL: ftp://ftp.openldap.org/pub/OpenLDAP/}}.
21
22 The project makes available two series of packages for {{general
23 use}}.  The project makes {{releases}} as new features and bug
24 fixes come available.  Though the project takes steps to improve
25 stablity of these releases, it is common for problems to arise
26 only after {{release}}.  The latest {{release}} which has
27 demonstrated stability through general use.
28
29 Users of OpenLDAP Software can choose, depending on their desire
30 for the {{latest features}} versus {{demonstrated stability}},
31 the most appropriate series to install.
32
33 After downloading OpenLDAP Software, you need to extract the
34 distribution from the compressed archive file and change your
35 working directory to the top directory of the distribution:
36
37 .{{EX:gunzip -c openldap-VERSION.tgz | tar xf -}}
38 .{{EX:cd openldap-VERSION}}
39
40 You'll have to replace {{EX:VERSION}} with the version name of
41 the release.
42
43 You should now review the {{F:COPYRIGHT}}, {{F:LICENSE}},
44 {{F:README}} and {{F:INSTALL}} documents provided with the
45 distribution.  The {{F:COPYRIGHT}} and {{F:LICENSE}} provide
46 information on acceptable use, copying, and limitation of warranty
47 of OpenLDAP software. The {{F:README}} and {{F:INSTALL}} documents
48 provide detailed information on prerequisite software and
49 installation procedures.
50
51
52 H2: Prerequisite software
53
54 OpenLDAP Software relies upon a number of software packages distributed
55 by third parties.  Depending on the features you intend to use,
56 you may have to download and install a number of additional
57 software packages.  This section details commonly needed third party
58 software packages you might have to install.  Note that some of
59 these third party packages may depend on additional software
60 packages.  Install each package per installation instructions
61 provided with it.
62
63
64 H3: {{TERM[expand]TLS}}
65
66 OpenLDAP clients and servers require installation of {{PRD:OpenSSL}}
67 {{TERM:TLS}} libraries to provide {{TERM[expand]TLS}} services.  Though
68 some operating systems may provide these libraries as part of the
69 base system or as an optional software component, OpenSSL often
70 requires separate installation.
71
72 OpenSSL is available from {{URL: http://www.openssl.org/}}.
73
74 OpenLDAP will not be fully LDAPv3 compliant unless OpenLDAP's
75 {{EX:configure}} detects a usable OpenSSL installation.
76
77
78 H3: Kerberos Authentication Services
79
80 OpenLDAP clients and servers support Kerberos-based authentication
81 services.
82 In particular, OpenLDAP supports {{TERM:SASL}}/{{TERM:GSSAPI}}
83 authentication mechanism using either {{PRD:Heimdal}} or
84 {{PRD:MIT Kerberos}} V packages.
85 If you desire to use Kerberos-based SASL/GSSAPI authentication,
86 you should install either Heimdal or MIT Kerberos V.
87
88 Heimdal Kerberos is available from {{URL:http://www.pdc.kth.se/heimdal/}}.
89 MIT Kerberos is available from {{URL:http://web.mit.edu/kerberos/www/}}.
90
91 Use of strong authentication services, such as those provided by
92 Kerberos, is highly recommended.
93
94
95 H3: {{TERM[expand]SASL}}
96
97 OpenLDAP clients and servers require installation of {{PRD:Cyrus}}'s
98 {{PRD:SASL}} libraries to provide {{TERM[expand]SASL}} services.  Though
99 some operating systems may provide this library as part of the
100 base system or as an optional software component, Cyrus SASL
101 often requires separate installation.
102
103 Cyrus SASL is available from
104 {{URL:http://asg.web.cmu.edu/sasl/sasl-library.html}}.
105 Cyrus SASL will make use of OpenSSL and Kerberos/GSSAPI libraries
106 if preinstalled.
107
108 OpenLDAP will not be fully LDAPv3 compliant unless OpenLDAP's
109 configure detects a usable Cyrus SASL installation.
110
111
112 H3: Database Software
113
114 OpenLDAP's {{slapd}}(8) primary database backend, {{TERM:LDBM}},
115 requires a compatible database package for entry storage.  LDBM
116 is compatible with {{ORG[expand]Sleepycat}}'s {{PRD:BerkeleyDB}} (recommended)
117 or the {{ORG[expand]FSF}}'s {{PRD:GNU}} Database Manager ({{PRD:GDBM}}).
118 If neither of these packages are available at configure time,
119 you will not be able build {{slapd}}(8) with a primary database backend.
120
121 Your operating system may provide one or both of these packages in
122 the base system or as an optional software component.  If not,
123 you'll have to obtain and install one of these packages yourself.
124
125 {{PRD:BerkeleyDB}} is available from {{ORG[expand]Sleepycat}}'s
126 download page {{URL: http://www.sleepycat.com/download.html}}.
127 There are several versions available.  At the time of this writing,
128 the latest release, version 4.0, is recommended. This package
129 is required if you wish to use the {{TERM:BDB}} database backend.
130
131 {{PRD:GDBM}} is available from {{ORG:FSF}}'s download site
132 {{URL: ftp://ftp.gnu.org/pub/gnu/gdbm/}}.
133 At the time of this writing, version 1.8 is the latest release.
134
135
136 H3: Threads
137
138 OpenLDAP is designed to take advantage of threads.  OpenLDAP
139 supports POSIX {{pthreads}}, Mach {{CThreads}}, and a number of
140 other varieties.  {{EX:configure}} will complain if it cannot
141 find a suitable thread subsystem.   If this occurs, please
142 consult the {{F:Software|Installation|Platform Hints}} section
143 of the OpenLDAP FAQ {{URL: http://www.openldap.org/faq/}}.
144
145
146 H3: TCP Wrappers
147
148 {{slapd}}(8) supports TCP wrappers (IP level access control filters)
149 if preinstalled.  Use of TCP wrappers or other IP-level access
150 filters (such as those provided by an IP-level firewall) is recommended
151 for servers containing non-public information.
152
153
154 H2: Running configure
155
156 Now you should probably run the {{EX:configure}} script with the
157 {{EX:--help}} option.
158 This will give you a list of options that you can change when building
159 OpenLDAP.  Many of the features of OpenLDAP can be enabled or disabled
160 using this method.
161 !if 0
162 Please see the appendix for a more detailed list of configure options,
163 and their usage.
164 !endif
165 >       ./configure --help
166
167 The {{EX:configure}} script will also look at various environment variables
168 for certain settings.  These environment variables include:
169
170 !block table; align=Center; coltags="EX,N"; title="Table 4.1: Environment Variables"
171 Variable        Description
172 CC              Specify alternative C Compiler
173 CFLAGS          Specify additional compiler flags
174 CPPFLAGS        Specify C Preprocessor flags
175 LDFLAGS         Specify linker flags
176 LIBS            Specify additional libraries
177 !endblock
178
179 Now run the configure script with any desired configuration options or
180 environment variables.
181
182 >       [[env] settings] ./configure [options]
183
184 As an example, let's assume that we want to install OpenLDAP with
185 LDBM backend and TCP wrapper support.  By default, LDBM
186 is enabled and TCP wrappers is not.  So, we just need to specify
187 {{EX:--with-wrappers}} to include TCP wrapper support:
188
189 >       ./configure --with-wrappers
190
191 However, this will fail to locate dependent software not
192 installed in system directories.  For example, if TCP Wrappers
193 headers and libraries are installed in {{F:/usr/local/include}}
194 and {{F:/usr/local/lib}} respectively, the {{EX:configure}}
195 script should be called as follows:
196
197 >       env CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" \
198 >               ./configure --with-wrappers
199
200 Note: Some shells, such as those derived from the Bourne {{sh}}(1),
201 do not require use of the {{env}}(1) command.  In some cases, environmental
202 variables have to be specified using alternative syntaxes.
203
204 The {{EX:configure}} script will normally auto-detect appropriate
205 settings.  If you have problems at this stage, consult any platform
206 specific hints and check your {{EX:configure}} options, if any.
207
208
209 H2: Building the Software
210
211 Once you have run the {{EX:configure}} script the last line of output
212 should be:
213 >       Please "make depend" to build dependencies
214
215 If the last line of output does not match, {{EX:configure}} has failed,
216 and you will need to review its output to determine what went wrong.
217 You should not proceed until {{EX:configure}} completes successfully.
218
219 To build dependencies, run:
220 >       make depend
221
222 Now build the software, this step will actually compile OpenLDAP.
223 >       make
224
225 You should examine the output of this command carefully to make sure
226 everything is built correctly. Note that this command builds the LDAP
227 libraries and associated clients as well as {{slapd}}(8) and {{slurpd}}(8).
228
229
230 H2: Testing the Software
231
232 Once the software has been properly configured and successfully
233 made, you should run the test suite to verify the build.
234
235 >       make test
236
237 Tests which apply to your configuration will run and they should pass.
238 Some tests, such as the replication test, may be skipped if not supported
239 by your configuration.
240
241
242 H2: Installing the Software
243
244 Once you have successfully tested the software, you are ready to install it.
245 You will need to have write permission
246 to the installation directories you specified when you ran configure.
247 By default OpenLDAP is installed in {{F:/usr/local}}.  If you changed this
248 setting with the {{EX:--prefix}} configure option, it will be installed
249 in the location you provided.
250
251 Typically, the installation typically requires super-user priviledges.
252 From the top level OpenLDAP source directory, type:
253
254 >       su root -c 'make install'
255
256 You should examine the output of this command carefully to make sure
257 everything is installed correctly. You will find the configuration files
258 for {{slapd}}(8) in {{F:/usr/local/etc/openldap}} by default.  See the
259 {{SECT:The slapd Configuration File}} chapter for additional information.
260