]> git.sur5r.net Git - openldap/blob - doc/guide/admin/install.sdf
ispell
[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 {{ORG:OpenLDAP}}
7 Software package including {{slapd}}(8), the stand-alone LDAP
8 daemon and {{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 {{ORG[expand]OLP}} also maintains an extensive site
18 ({{URL:http://www.OpenLDAP.org/}}) on the World Wide Web.  The site
19 makes available a number of resources which you may utilize to
20 properly install OpenLDAP Software.  This includes:
21
22 !block table; align=Center; coltags="N,URL"
23 Resource                        URL
24 Documentation Catalog           http://www.OpenLDAP.org/doc/
25 Frequently Asked Questions      http://www.OpenLDAP.org/faq/
26 Issue Tracking System           http://www.OpenLDAP.org/its/
27 Mailing Lists                   http://www.OpenLDAP.org/lists/
28 Software Pages                  http://www.OpenLDAP.org/software/
29 Support Page                    http://www.OpenLDAP.org/support/
30 !endblock
31  
32 H2: Prerequisite software
33
34 OpenLDAP relies a number of software packages distributed by third
35 parties.  Depending on the features you intend to use, you may have
36 to download and install a number of additional software packages.
37 This section details commonly needed third party software packages
38 you might have to install.  Note that some of these third party
39 packages may depend on additional software packages.  Install each
40 package per installation instructions provided with it.
41
42 H3: {{TERM[expand]TLS}}
43
44 OpenLDAP clients and servers require installation of {{PRD:OpenSSL}}
45 {{TERM:TLS}} libraries to provide {{TERM[expand]TLS}} services.  Though
46 some operating systems may provide these libraries as part of the
47 base system or as an optional software component, OpenSSL often
48 requires separate installation.
49
50 OpenSSL is available from {{URL: http://www.openssl.org/}}.
51
52 OpenLDAP will not be fully LDAPv3 compliant unless OpenLDAP's
53 {{EX:configure}} detects a usable OpenSSL installation.
54
55 H3: Kerberos Authentication Services
56
57 OpenLDAP clients and servers support Kerberos based authentication
58 services.
59 In particular, OpenLDAP supports {{TERM:SASL}}/{{TERM:GSSAPI}} based
60 authentication using either {{PRD:Heimdal}} or {{PRD:MIT Kerberos}}
61 V packages.
62 If you desire to use Kerberos based authentication, you should
63 install either Heimdal or MIT Kerberos V.
64
65 Heimdal Kerberos is available from {{URL:http://www.pdc.kth.se/heimdal/}}.
66 MIT Kerberos is available from {{URL:http://web.mit.edu/kerberos/www/}}.
67
68 Use of strong authentication services, such as those provided by
69 Kerberos, is highly recommended.
70
71 H3: {{TERM[expand]SASL}}
72
73 OpenLDAP clients and servers require installation of {{PRD:Cyrus}}
74 SASL libraries to provide {{TERM[expand]SASL}} services.  Though
75 some operating systems may provide this library as part of the
76 base system or as an optional software component, Cyrus SASL
77 often requires separate installation.
78
79 Cyrus SASL is available from {{URL:http://asg.cmu.edu/cyrus/sasl/}}.
80 Cyrus SASL will make use of OpenSSL and Kerberos/GSSAPI libraries
81 if preinstalled.
82
83 OpenLDAP will not be fully LDAPv3 compliant unless OpenLDAP's
84 configure detects a usable Cyrus SASL installation.
85
86 H3: Database software
87
88 OpenLDAP's {{slapd}}(8) primary database backend, {{TERM:LDBM}},
89 requires that a compatible database package for entry storage.  LDBM
90 is compatible with {{ORG[expand]Sleepy}}'s {{PRD:BerkeleyDB}} (recommended)
91 or the {{ORG[expand]FSF}}'s {{PRD:GNU}} Database Manager ({{PRD:GDBM}}).
92 If neither of these packages are available at configure time,
93 you will not be able build slapd(8) with primary database backend.
94
95 Your operating system may provide one of these two packages in
96 in base system or as an optional software component.  You may
97 need may need to obtain the software and install it yourself.
98
99 {{PRD:BerkeleyDB}} is available from {{ORG[expand]Sleepy}}'s
100 download page {{URL: http://www.sleepycat.com/download.html}}.
101 There are several versions available.  At the time of this writing,
102 the latest release, version 3.1, is recommended. 
103
104 {{PRD:GDBM}} is available from {{ORG:FSF}}'s download site
105 {{URL: ftp://ftp.gnu.org/pub/gnu/gdbm/}}.
106 At the time of this writing, version 1.8 is the latest release.
107
108 H3: Threads
109
110 OpenLDAP is designed to take advantage of threads.  OpenLDAP
111 supports POSIX {{pthreads}}, Mach {{CThreads}}, and a number of
112 other varieties.  {{EX:configure}} will complain if it cannot
113 find a suitable thread subsystem.   If this occurs, please
114 consult the {{F:Software|Installation|Platform Hints}} section
115 of the OpenLDAP FAQ {{URL: http://www.openldap.org/faq/}}.
116
117 H3: TCP Wrappers
118
119 {{slapd}}(8) supports TCP wrappers (IP level access control filters)
120 if preinstalled.  Use of TCP wrappers or other IP level access
121 filters (such as those provided by IP firewall) is recommended
122 for servers containing non-public information.
123
124
125 H2: Configuring OpenLDAP
126
127 If you haven't already done so, extra the distribution for the
128 compressed archive file and change directory to the top of the
129 distribution:
130
131 .{{EX:gunzip -c openldap-VERSION.tgz | tar xf -}}
132 .{{EX:cd openldap-VERSION}}
133
134 Replacing {{EX:VERSION}} with the appropriate version string.
135
136 Note: If you intend to build OpenLDAP for multiple platforms from a
137 single source tree you should consult the {{F: INSTALL}} file in the
138 top level distribution directory before running {{EX:configure}}.
139
140 Now you should probably run the {{EX:configure}} script with the
141 {{EX:--help}} option.
142 This will give you a list of options that you can change when building
143 OpenLDAP.  Many of the features of OpenLDAP can be enabled or disabled
144 using this method.  Please see the appendix for a more detailed list
145 of configure options, and their usage.
146 .{{EX:./configure --help}}
147
148 The {{EX:configure}} script will also look at certain environment variables
149 for certain settings.  These environment variables are:
150
151 !block table; align=Center; coltags="EX,N"; title="Table 4.1: Environment Variables"
152 Variable        Description
153 CC              Specify alternative C Compiler
154 CFLAGS          Specify additional compiler flags
155 CPPFLAGS        Specify C Preprocessor flags
156 LDFLAGS         Specify linker flags
157 LIBS            Specify additional libraries
158 !endblock
159
160 Now run the configure script with any desired configure options or
161 environment variables.
162
163 >       [[env] settings] ./configure [options]
164
165 As an example, lets assume that we want a copy of OpenLDAP configured to use the
166 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.
167
168 Additionally, we've installed the BerkeleyDB database package.  
169 {{EX:configure}} is smart enough to use BerkeleyDB automatically
170 if it can find it, but BerkeleyDB is installed by default in a
171 place {{EX:configure}} won't look at automatically.  BerkeleyDB
172 is usually installed in {{F:/usr/local/BerkeleyDB.3.1}} (assuming
173 that version 3.1 is being used.) 
174
175 The following example shows how to run {{EX:configure}} and specify where to 
176 find BerkeleyDB and turn on the DNS-SRV backend.  The example should be 
177 entered on a single line (it has been split onto separate lines for clarity.)
178
179 >       env CPPFLAGS="-I/usr/local/BerkeleyDB.3.1/include" \
180 >               LDFLAGS="-L/usr/local/BerkeleyDB.3.1/lib" \
181 >               ./configure --enable-dnssrv
182
183 Note: Some shells, such as those derived from the Bourne {{sh}}(1),
184 do not require use of the {{env}}(1) command.  In some cases, environmental
185 variables have to be specified using alternative syntaxes.
186
187 For more information on backends see the chapter on configuration.
188
189 The {{EX:configure}} script will normally auto-detect appropriate settings.
190 If you have problems at this stage, consult any platform specific
191 hints and check your {{EX:configure}} options if any.
192
193 H2: Building the Software
194
195 Once you have run the {{EX:configure}} script the last line of output
196 should be:
197 >       Please "make depend" to build dependencies
198
199 If the last line of output does not match, {{EX:configure}} has failed.
200 You should not proceed until {{EX:configure}} completes successfully.
201
202 To build dependencies, run:
203 >       make depend
204
205 Now build the software, this step will actually compile OpenLDAP.
206 >       make
207
208 You should examine the output of this command carefully to make sure
209 everything is built correctly. Note that this command builds the LDAP
210 libraries and associated clients as well as {{slapd}}(8) and {{slurpd}}(8).
211
212 H2: Testing the Software
213
214 Once the software has been properly configured and successfully
215 made, you should run the test suite to verify the build.
216
217 >       make test
218
219 The test will run a number of tests.
220
221 H2: Installing the Software
222
223 One you have successfully tested the software, you are ready to install it.
224 You will need to have write permission
225 to the installation directories you specified when you ran configure.
226 By default OpenLDAP is installed in {{F:/usr/local}}.  If you changed this
227 setting with the {{F:--prefix}} configure option, it will be installed
228 in the location you provided.
229
230 Typically, the installation is done as {{root}}. From the top level OpenLDAP
231 source directory, type:
232
233 >       make install
234
235 You should examine the output of this command carefully to make sure
236 everything is installed correctly. You will find the configuration files
237 for slapd in {{F:/usr/local/etc/openldap}} by default.  See chapter 5 for more
238 information on the configuration files.
239