]> git.sur5r.net Git - openldap/blob - doc/guide/admin/install.sdf
Minor adjustments to paths due to reorganization
[openldap] / doc / guide / admin / install.sdf
1 # Copyright 1999, The OpenLDAP Foundation, All Rights Reserved.
2 # COPYING RESTRICTIONS APPLY, see COPYRIGHT.
3 H1: Building and Installing slapd & slurpd
4
5 Building and installing slapd requires three simple steps: configuring;
6 making; and installing. The following sections describe each step in
7 detail. If you are reading this guide, chances are you have already
8 obtained the software, but just in case, here's where you can get the
9 latest version of the OpenLDAP package, which includes all of the
10 software discussed in this guide:
11
12 {{CMD[jump="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release.tgz"]ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release.tgz}}
13
14 There is also an OpenLDAP homepage accessible from the World
15 Wide Web. This page contains the latest OpenLDAP news, release
16 announcements, and pointers to other resources. You can access it
17 at:
18
19 {{CMD[jump="http://www.OpenLDAP.org/"]http://www.OpenLDAP.org/}}
20
21
22 H2: Pre-Build Configuration
23
24 Before building slapd, be sure to take a look at the README file in the
25 top level directory in the distribution so that you are familiar with the
26 general configuration and make process.
27
28 Briefly, you should edit the include/ldapconfig.h.edit and
29 Make-common files to contain the site-specific configuration your site
30 requires before making. The next sections discuss these steps in
31 more detail.
32
33
34
35 H3: Editing the {{EX: Make-common}} file
36
37 All of the general Make-common configuration variables (e.g.,
38 ETCDIR, BINDIR, etc.) apply to both slapd and slurpd. There are
39 additional Make-common configuration variables that also affect how
40 slapd and slurpd are built. They are:
41
42 H4: MAKE_SLAPD
43
44 This option controls whether slapd and slurpd get built at all. You
45 should set it to yes, like this:
46
47 E: MAKE_SLAPD = yes
48
49 H4: SLAPD_BACKENDS
50
51 This option controls which slapd backend databases get built. You
52 should set it to one or more of the following:
53
54 *{{EX: DLDAP_LDBM}} This is the main backend. It is a high-performance
55 disk-based database suitable for handling up to a million entries or so.
56 See the LDBMBACKEND and LDBMLIB options below.
57
58 *{{EX: DLDAP_PASSWD}} This is a simple search-only backend that can be
59 pointed at an {{EX: /etc/passwd}} file. It is intended more as an example than
60 as a real backend.
61
62 *{{EX: DLDAP_SHELL}} This backend allows the execution of arbitrary
63 system administrator-defined commands in response to LDAP
64 queries. The commands to execute are defined in the configuration file.
65 See Appendix B for more information on writing shell backend
66 programs.
67
68 Example to enable the LDBM and SHELL backends only:
69
70 E: SLAPD_BACKENDS= -DLDAP_LDBM -DLDAP_SHELL
71
72 The default is to build all three backends. Note that building a backend
73 only means that it can be enabled through the configuration file, not
74 that it will automatically be enabled.
75
76 H4: LDBMBACKEND
77
78 This option should only be defined if you have enabled the LDBM
79 backend as described above. The LDBM backend relies on a
80 low-level hash or B-tree package for its underlying database. This
81 option selects which package it will use. The currently supported
82 options in order of preference are:
83
84 *{{EX: DLDBM_USE_DBBTREE}}
85 .
86 .This option enables the Berkeley DB package btree database as the
87 .LDBM backend. You can get this package from
88 .
89 .{{CMD[jump="ftp://ftp.cs.berkeley.edu/ucb/4bsd/db.tar.Z"]ftp://ftp.cs.berkeley.edu/ucb/4bsd/db.tar.Z}}
90 .
91
92 *{{EX: DLDBM_USE_DBHASH}}
93 .
94 .This option enables the Berkeley DB package hash database as the
95 .LDBM backend. You can get this package from
96 .
97 .{{CMD[jump="ftp://ftp.cs.berkeley.edu/ucb/4bsd/db.tar.Z"]ftp://ftp.cs.berkeley.edu/ucb/4bsd/db.tar.Z}}
98 .
99
100 *{{EX: DLDBM_USE_GDBM}}
101 .
102 .This option enables GNU dbm as the LDBM backend. You can get this
103 .package from
104 .
105 .{{CMD[jump="ftp://prep.ai.mit.edu/pub/gnu/gdbm-1.7.3.tar.gz"]ftp://prep.ai.mit.edu/pub/gnu/gdbm-1.7.3.tar.gz}}
106 .
107
108 *{{EX: DLDBM_USE_NDBM}}
109 .
110 .This option enables the standard UNIX ndbm(3) package as the
111 .LDBM backend. This package should come standard on your UNIX
112 .system. man ndbm for details.
113 .
114
115 Example to enable the Berkeley DB Btree backend:
116
117 E: LDBMBACKEND= -DLDBM_USE_DBBTREE
118
119 The default is -DLDBM_USE_NDBM, since it is the only one available
120 on all UNIX systems. NDBM has some serious limitations, though (not
121 thread-safe, severe size limits), and you are strongly encouraged to
122 use one of the other packages if you can.
123
124 Note[label='Note to Solaris users: '] If you are running under Solaris 2.x
125 and linking in an external database package (e.g., db or gdbm) it is
126 very important that you compile the package with the {{EX: D_REENTRANT}}
127 flag. If you do not, bad things will happen.
128
129 If you are using version 1.85 or earlier of the Berkeley db package, you
130 will need to apply the patch found in build/db.1.85.patch to the db
131 source before compiling it. You can do this with a command like this
132 from the db source area:
133
134 E: patch -p < ldap-source-directory/build/db.1.85.patch
135
136 H4: LDBMLIB
137
138 This option should only be defined if you have enabled the LDBM
139 backend as described above, and the necessary library for the
140 LDBMBACKEND option you chose above is not part of the standard C
141 library (i.e., anything other than NDBM). This option specifies the library
142 to link containing the package you selected, and optionally, its location.
143
144 Example to link with {{EX: libdb.a}}, contained in {{EX: /usr/local/lib}}:
145
146 E: LDBMLIB= -L/usr/local/lib -ldb
147
148 H4: THREADS
149
150 This option is normally set automatically in the {{EX: Make-platform}} file,
151 based on the platform on which you are building. You do not normally
152 need to set it. If you want to use a non-default threads package, you
153 can specify the appropriate {{EX: -Ddefine}} to enable it here.
154
155 H4: THREADSLIB
156
157 This option is normally set automatically in the {{EX: Make-platform}} file,
158 based on the platform on which you are building. You do not normally
159 need to set it. If you have set {{EX: THREADS}} to a non-default threads
160 package as described above, you can specify the appropriate
161  {{EX: -Ldirectory}} flag and  {{EX: -llibname}} flag needed to link the package here.
162
163 H4: PHONETIC
164
165 This option controls the phonetic algorithm used by {{I: slapd}} when doing
166 approximate searches. The default is to use the metaphone algorithm.
167 You can have {{I: slapd}} use the soundex algorithm by setting this variable
168 to  {{EX: -DSOUNDEX}}.
169
170
171 H3: Editing the {{EX: include/ldapconfig.h}} file
172
173 In addition to setting the {{EX: LDAPHOST}} and {{EX: DEFAULT_BASE}} defines
174 near the top of this file, there are some slapd-specific defines near the
175 bottom of the file you may want to change. The defaults should be just
176 fine, unless you have special needs.
177
178 H4: SLAPD_DEFAULT_CONFIGFILE
179
180 This define sets the location of the default slapd configuration file.
181 Normally, it is set to {{EX: $(ETCDIR)/slapd.conf}}, where 
182 {{EX: ETCDIR}} comes from Make-common.
183
184 H4: SLAPD_DEFAULT_SIZELIMIT
185
186 This define sets the default size limit on the number of entries returned
187 from a search. This option is configurable via the tailor file, but if you
188 want to change the default, do it here.
189
190 H4: SLAPD_DEFAULT_TIMELIMIT
191
192 This define sets the default time limit for a search. This option is
193 configurable via the tailor file, but if you want to change the default, do it
194 here.
195
196 H4: SLAPD_PIDFILE
197
198 This define sets the location of the file to which slapd will write its
199 process ID when it starts up.
200
201 H4: SLAPD_ARGSFILE
202
203 This define sets the location of the file to which slapd will write its
204 argument vector when it starts up.
205
206 H4: SLAPD_MONITOR_DN
207
208 This define sets the distinguished name used to retrieve monitoring
209 information from {{I: slapd}}. See section 7 for more details.
210
211 H4: SLAPD_LDBM_MIN_MAXIDS
212
213 This define is only relevant to the LDBM backend. It sets the minimum
214 number of entry IDs that an index entry will contain before it becomes
215 an allIDs entry. See Section 9.1 for more details.
216
217
218
219 H2: Making the Software
220
221 Once you have edited the {{EX: include/ldapconfig.h.edit}} file and the
222 Make-common file (see the top level {{EX: README}} file in the distribution),
223 you are ready to make the software. From the top level LDAP source
224 directory, type
225
226 E: make
227
228 You should examine the output of this command carefully to make sure
229 everything is built correctly. Note that this command builds the LDAP
230 libraries and associated clients as well as slapd and slurpd.
231
232 Note that the LDAP distribution can support making for multiple
233 platforms from a single source tree. If you want to do this, consult the
234 {{EX: INSTALL}} file in the top level distribution directory.
235
236
237
238 H2: Installing the Software
239
240 Once the software has been properly configured and successfully
241 made, you are ready to install it. You will need to have write permission
242 to the installation directories you specified in the {{EX: Make-common}} file.
243 Typically, the installation is done as root. From the top level LDAP
244 source directory, type
245
246 E: make install
247
248 You should examine the output of this command carefully to make sure
249 everything is installed correctly. Slapd, slurpd, and their configuration
250 files, {{EX: slapd.conf}}, {{EX: slapd.at.conf}}, and {{EX: slapd.oc.conf}}
251  will be installed in the {{EX: ETCDIR}} directory you specified 
252 in the {{EX: Make-common}} file.
253
254 This command will install the entire LDAP distribution. If you only want
255 to install slapd and slurpd, you could do something like this:
256
257 E: (cd servers/slapd; make install)
258
259 E: (cd servers/slurpd; make install)
260
261 Note: The installation process installs configuration files as well as
262 binaries. Existing configuration files are first moved to a name with a
263 dash '-' appended, e.g., {{EX: slapd.conf}} is moved to {{EX: slapd.conf-}}. 
264 If you install things twice, however, you can lose your existing configuration
265 files.
266
267
268 PB:
269
270