]> git.sur5r.net Git - openldap/blob - INSTALL
Add "edit client configuration" & "edit server configuration" steps.
[openldap] / INSTALL
1 Making and Installing the OpenLDAP Distribution
2
3 **
4 ** It is recommended that you read or at least skim through ALL of the
5 ** instructions in this file before attempting to build the software.
6 **
7 ** The OpenLDAP Installation FAQ is available at:
8 **    http://www.openldap.org/faq/index.cgi?file=8
9 **
10 ** You should also check for platform specific hints.
11 ** These are located in doc/install/hints or:
12 **    http://www.openldap.org/faq/index.cgi?file=9
13 **
14
15 If you want to build binaries for more than one platform from a single
16 source tree, skip ahead to the "Building LDAP For More Than One Platform"
17 section near the end of this file.
18
19 If you simply want to build LDAP for a single machine platform, follow
20 these steps:
21
22  1. untar the distribution and cd to the top:
23
24         % tar xfz openldap-VERSION.tgz
25         % cd ldap
26
27     If you are reading this file, you probably have already done this!
28
29  2. Type:
30         % ./configure --help
31
32         to list available configuration options.   A description of
33         these options is provided in the 'CONFIGURE OPTIONS' section
34         below.
35
36         The configure script uses environmental variables for
37         determining compiler/linker options.  See the HINTS
38         section for commonly used settings. 
39
40         These environment variables are used: 
41                 CC                      C Compiler      (cc, ecgs)
42                 CFLAGS          C Flags         (-ansi)
43                 CPPFLAGS        CPP Flags       (-I/path/include -Ddef)
44                 LDFLAGS         LDFLAGS         (-L/path/lib)
45                 LIBS            LIBS            (-llib)
46
47         See the 'USING ENVIRONMENT VARIABLES' section for information
48         on how to use the variables. 
49
50  3. edit the file include/ldapconfig.h.edit to configure
51     the software for your site (the files are well-commented):
52
53         % vi include/ldapconfig.h.edit
54
55  4. Configure the build system
56
57         % [env settings] ./configure [options]
58
59         If all goes well, the configure script with auto-detect the
60         appropriate settings.  Use configure enable/with options and/or
61         environment variables to obtain desired results.
62
63  5. Build dependencies
64
65         % make depend
66
67  6. Build the system
68
69         % make
70
71     If all goes well, the system will build as configured.  If not,
72         return to step 4 after reviewing the configuration settings.
73
74         You may want to consult the doc/install/hints file for your
75         platform.
76
77  7. Test the standalone system
78
79         This step requires the standalone LDAP server (slapd) with
80         LDBM support.
81
82         % cd tests
83         % make
84
85         If all goes well, the system has been built as configured.  If not,
86         return to step 4 after reviewing your configuration settings.
87
88         You may want to consult the doc/install/hints file for your
89         platform.
90
91  8. install the binaries and man pages.  You may need to be superuser to
92     do this (depending on where you are installing things):
93
94         % su
95         # make install
96
97     That's it!
98
99         See the man pages for the individual applications for
100         information on configuring and using them.  You may also want
101         to edit the configuration files used by the various clients.
102         These configuration files are located in the OpenLDAP
103         configuration directory (normally /usr/local/etc/openldap).
104
105         ldap.conf            - LDAP defaults
106         ldapfilter.conf      - search filter configuration
107         ldapsearchprefs.conf - search object definitions
108         ldaptemplates.conf   - display template definitions
109
110     There are section 5 man pages for all of these files.
111
112  9. edit client configuration files as needed.
113         See ldap.conf(5) for details.
114
115 10. edit server configuration files as needed.
116         See slapd.conf(5) if running slapd.
117         See ldapd.conf(5) if running ldapd.
118
119
120 Building LDAP For More Than One Platform
121
122 It is now possible to build LDAP for more than one platform from the same
123 source tree.  This is accomplished by using make(1) VPATH support.  If
124 your make(1) program is old and doesn't have VPATH support, install GNU
125 Make.
126
127 Follow these steps for each different platform:
128
129  1.     Create a directory for the platform object files.
130
131         % mkdir obj-platform
132
133  2. Change your working directory to the platform object directory.
134
135         % cd obj-platform
136
137  3. Configure the build system
138
139         % [env settings] ../configure --src-dir=.. [options]
140
141                 ( replace ".." with the appropriate path )
142
143  4. Continue as above (starting at step 6).
144
145         Note: make depend in VPATH environment is not yet supported.
146
147
148 CONFIGURE OPTIONS
149
150 Regrettably, this section has not been written (yet).  See
151 "./configure --help" for current list of options.  For general
152 information about how to use "configure", please read:
153         doc/install/configure
154
155
156 USING ENVIRONMENT VARIABLES
157
158 The configure script will also use your environmental
159 variables for determining compiler/linker options.   This can
160 be used to manual specify features and compilation options.
161
162 NOTE: If you change environment setting, be sure to remove
163         any config.cache before running ./configure.
164
165 Supported Environmental Variables
166         CC                      C compiler              (cc, egcc)
167         CFLAGS          C flags                 (-ansi)
168         CPPFLAGS        cpp flags               (-I/path/include -Ddef)
169         LDFLAGS         ld flags                (-L/usr/local/lib)
170         LIBS            libraries               (-llib)
171         PATH            command path    /usr/local/bin:/usr/bin:/bin
172
173 * Including alternative compilers
174         Use the CC environment variable to tell configure to
175         use a specific compiler.  For example, to use ecgs
176         instead of the compiler configure choose, use:
177
178         [env] CC=egcc ./configure 
179
180         You can also use 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         [env] CC="gcc -ansi -pedantic" ./configure
185
186         (you can use CFLAGS to specify compiler flags)
187
188 * Preprocessor Flags
189         You may specify additional preprocessor flags by setting
190         CPPFLAGS.  For example, if you would like to use headers
191         installed in /usr/local/include, use:
192
193         [env] CPPFLAGS="-I/usr/local/include" ./configure
194
195         You can also use CPPFLAGS to specify preprocessor macros.
196
197         [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
198
199 * Linker Flags
200         You may specify additional linker flags by setting LDFLAGS.
201         For example, if you would like to use libraries installed
202         in /usr/local/lib, use:
203
204         [env] LDFLAGS="-L/usr/local/lib" ./configure
205
206         You can also use CPPFLAGS to specify linker flags:
207
208         [env] LDFLAGS="-Bstatic" ./configure
209
210 * Path
211         You may alter your path to affect configure ability to
212         find (or not find) commands.  For example, to have configure
213         additionally look in /usr/css/bin for commands, use:
214
215         [env] PATH="/usr/css/bin:$PATH" ./configure
216         
217
218 HINTS
219
220 * Platform specific hints are available in doc/install/hints.
221
222 * Use software under installed in /usr/local/{include,lib}
223         [env] \
224                 CPPFLAGS="-I/usr/local/include" \
225                 LDFLAGS="-L/usr/local/lib" \
226                 ./configure
227
228
229 End of OpenLDAP INSTALL file.