]> git.sur5r.net Git - openldap/blob - doc/guide/release/install.sdf
b4794939a2720136825df8d2f1e8c20263e025cb
[openldap] / doc / guide / release / install.sdf
1 # $OpenLDAP$
2 # Copyright 1999-2000, The OpenLDAP Foundation, All Rights Reserved.
3 # COPYING RESTRICTIONS APPLY, see COPYRIGHT.
4
5 P1: Making and Installing the OpenLDAP Distribution
6
7 This file provides brief instructions on how to build and install
8 OpenLDAP on UNIX (and UNIX-{{like}}) system.
9
10 It is recommended that you read, or at least skim through, ALL of
11 the instructions in this file before attempting to build the
12 software.
13
14 It is also recommended your review
15 {{The OpenLDAP Administrator's Guide}}
16 ({{URL:http://www.openldap.org/doc/admin/}}) and
17 the {{Frequently Asked Questions}} ({{URL:http://www.openldap.org/faq/}})
18 pages, in particular the
19 {{Installation section}} ({{URL:http://www.openldap.org/faq/index.cgi?file=8}})
20 and
21 {{Platform Hints}} ({{URL:http://www.openldap.org/faq/index.cgi?file=9}})
22 should be examined.
23
24
25 P2: Making and Installing the OpenLDAP Distribution
26
27 ^ Unpack the distribution and change directory:
28
29 E:      % tar xfz openldap-VERSION.tgz
30 E:      % cd openldap-VERSION
31
32 .(replacing {{EX:VERSION}} with the appropriate version string).  If
33 you are reading this file, you probably have already done this!
34
35
36 + Type:
37
38 E:      % ./configure --help
39
40 .to list available configuration options.   A description of
41 these options is provided in the 'CONFIGURE OPTIONS' section
42 below.
43
44 .The {{EX:configure}} script uses environmental variables for
45 determining compiler/linker options.  See the 'USING ENVIRONMENT
46 VARIABLES' section for commonly used settings.
47
48 .These environment variables are used: 
49
50 >       CC              C compiler      gcc
51 >       CFLAGS          C flags         -O -g
52 >       CPPFLAGS        cpp flags       -I/path/include -Ddef
53 >       LDFLAGS         ld flags        -L/usr/local/lib
54 >       LIBS            libraries       -llib
55 >       PATH            command path    /usr/local/bin:/usr/bin:/bin
56
57 .See the 'USING ENVIRONMENT VARIABLES' section for information
58 on how to use the variables. 
59
60 + Configure the build system
61
62 E:      % [env settings] ./configure [options]
63
64 .If all goes well, the {{EX:configure}} script with automatically
65 detect the appropriate settings.  However, you may need to
66 specify options and/or environment variables to obtain desired
67 results.
68
69 + Build dependencies
70
71 E:      % make depend
72
73 + Build the system
74
75 E:      % make
76
77 .If all goes well, the system will build as configured.  If not,
78 return to step 3 after reviewing the configuration settings.  You
79 may want to consult the {{Platform Hints}} subsection of the {{FAQ}}
80 if you have not done so already.
81
82 + Test the standalone system
83
84 .This step requires the standalone LDAP server, {{slapd}}(8),
85 with {{LDBM}} support.
86
87 E:      % make test
88
89 .If all goes well, the system has been built as configured.  If not,
90 return to step 4 after reviewing your configuration settings.  You
91 may want to consult the {{Installation}} section of the {{FAQ}}
92 if you have not done so already.
93
94 + install the binaries and man pages.  You may need to be {{superuser}}
95 to do this (depending on where you are installing things):
96
97 E:      % su root -c 'make install'
98
99 + That's it!
100
101 See the {{Administrator's Guide}} and the manual pages for the
102 individual applications for configuration and use information.
103 You may also want to edit the configuration files used by the
104 various components.  These configuration files are located in
105 the OpenLDAP configuration directory (normally
106 {{F:/usr/local/etc/openldap}}).
107
108 >       ldap.conf               client defaults
109 >       ldapfilter.conf         search filter configuration
110 >       ldapsearchprefs.conf    search object definitions
111 >       ldaptemplates.conf      display template definitions
112 >       slapd.conf              Standalone LDAP daemon
113 >       schema/*.schema         Schema Definitions
114
115 There are section 5 man pages for these configuration files.
116
117
118 P2: Building OpenLDAP For More Than One Platform
119
120 You can build OpenLDAP for more than one platform from the
121 same source tree.
122 This is accomplished by using {{make}}(1) {{EX:VPATH}} support.
123 If your {{make}}(1) program is old and doesn't have {{EX:VPATH}}
124 support, install {{BSD Make}} or {{GNU Make}}.
125
126 Follow these steps for each different platform:
127
128 ^ Create a directory for the platform object files.
129
130 E:      % mkdir obj-platform
131
132 + Change your working directory to the platform object directory.
133
134 E:      % cd obj-platform
135
136 + Configure the build system
137
138 E:      % [env settings] ../configure --src-dir=.. [options]
139
140 . ( replace "{{F:..}}" with the appropriate path )
141
142 + Continue as above (starting at step 6).
143
144
145 P2: CONFIGURE OPTIONS
146
147 Regrettably, this section has not been written (yet).  See
148 "{{EX:./configure --help}}" for current list of options.  For general
149 information about how to use "{{EX:configure}}", please read
150 {{F:doc/install/configure}}.
151
152
153 P2: USING ENVIRONMENT VARIABLES
154
155 The configure script will also use your environmental
156 variables for determining compiler/linker options.   This can
157 be used to manual specify features and compilation options.
158
159 Note[label=Warning]: Executables built in your environment may not run
160 in your users' environments.  The portability of executables
161 between environments is your responsibility.
162
163 Supported Environmental Variables:
164
165 >       CC              C compiler      cc
166 >       CFLAGS          C flags         -O -g
167 >       CPPFLAGS        cpp flags       -I/path/include -Ddef
168 >       LDFLAGS         ld flags        -L/usr/local/lib
169 >       LIBS            libraries       -llib
170 >       PATH            command path    /usr/local/bin:/usr/bin:/bin
171
172 * Including alternative compilers
173
174 .Use the {{EX:CC}} environment variable to tell configure to
175 use a specific compiler.  For example, to use {{GNU C
176 Compiler}} instead of the default compiler, use:
177
178 E:      % [env] CC=gcc ./configure 
179
180 .You can also use {{EX:CC}} use specific flags with the
181 specified compiler.  For example, to require strict
182 {{ANSI C}} using the {{GNU C Compiler}}, use:
183
184 E:      % [env] CC="gcc -ansi -pedantic" ./configure
185
186 .(you can use {{EX:CFLAGS}} to specify compiler flags)
187
188 * Preprocessor Flags
189
190 .You may specify additional preprocessor flags by setting
191 {{EX:CPPFLAGS}}.  For example, if you would like to use headers
192 installed in {{F:/usr/local/include}}, use:
193
194 E:      % [env] CPPFLAGS="-I/usr/local/include" ./configure
195
196 .You can also use {{EX:CPPFLAGS}} to specify preprocessor macros.
197
198 E:      % [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
199
200 * Linker Flags
201
202 .You may specify additional linker flags by setting {{EX:LDFLAGS}}.
203 For example, if you would like to use libraries installed
204 in {{F:/usr/local/lib}}, use:
205
206 E:      % [env] LDFLAGS="-L/usr/local/lib" ./configure
207
208 .You can also use CPPFLAGS to specify linker flags:
209
210 E:      % [env] LDFLAGS="-Bstatic" ./configure
211
212 * Path
213
214 .You may alter your path to affect configure ability to
215 find (or not find) commands.  For example, to have configure
216 additionally look in {{F:/usr/css/bin}} for commands, use:
217
218 E:      % [env] PATH="/usr/css/bin:$PATH" ./configure
219         
220 * Using locally installed software
221
222 .To use software under installed under {{F:/usr/local}}.
223
224 E:      [env] \
225 E:              CPPFLAGS="-I/usr/local/include" \
226 E:              LDFLAGS="-L/usr/local/lib" \
227 E:              ./configure
228
229 Note: You may have to add additional flags if your system
230 supports shared libraries.
231
232
233 End of OpenLDAP INSTALL file.
234
235 {{S:$OpenLDAP$}}