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