]> git.sur5r.net Git - openldap/blob - INSTALL
Remove quick install guide from README, it's too quick. Update INSTALL.
[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         Client configuration files:
106           ldap.conf            - client defaults
107           ldapfilter.conf      - search filter configuration
108           ldapsearchprefs.conf - search object definitions
109           ldaptemplates.conf   - display template definitions
110
111         Server configuration files:
112           ldapd.conf           - LDAP - X.500 daemon
113           slapd.conf           - Standalone LDAP daemon
114
115     There are section 5 man pages for all of these files.
116
117
118 Building LDAP For More Than One Platform
119
120 It is now possible to build LDAP for more than one platform from the same
121 source tree.  This is accomplished by using make(1) VPATH support.  If
122 your make(1) program is old and doesn't have VPATH support, install GNU
123 Make.
124
125 Follow these steps for each different platform:
126
127  1.     Create a directory for the platform object files.
128
129         % mkdir obj-platform
130
131  2. Change your working directory to the platform object directory.
132
133         % cd obj-platform
134
135  3. Configure the build system
136
137         % [env settings] ../configure --src-dir=.. [options]
138
139                 ( replace ".." with the appropriate path )
140
141  4. Continue as above (starting at step 6).
142
143         Note: make depend in VPATH environment is not yet supported.
144
145
146 CONFIGURE OPTIONS
147
148 Regrettably, this section has not been written (yet).  See
149 "./configure --help" for current list of options.  For general
150 information about how to use "configure", please read:
151         doc/install/configure
152
153
154 USING ENVIRONMENT VARIABLES
155
156 The configure script will also use your environmental
157 variables for determining compiler/linker options.   This can
158 be used to manual specify features and compilation options.
159
160 NOTE: If you change environment setting, be sure to remove
161         any config.cache before running ./configure.
162
163 Supported Environmental Variables
164         CC                      C compiler              (cc, egcc)
165         CFLAGS          C flags                 (-ansi)
166         CPPFLAGS        cpp flags               (-I/path/include -Ddef)
167         LDFLAGS         ld flags                (-L/usr/local/lib)
168         LIBS            libraries               (-llib)
169         PATH            command path    /usr/local/bin:/usr/bin:/bin
170
171 * Including alternative compilers
172         Use the CC environment variable to tell configure to
173         use a specific compiler.  For example, to use ecgs
174         instead of the compiler configure choose, use:
175
176         [env] CC=egcc ./configure 
177
178         You can also use CC use specific flags with the
179         specified compiler.  For example, to require strict
180         ANSI C using the GNU C Compiler, use:
181
182         [env] CC="gcc -ansi -pedantic" ./configure
183
184         (you can use CFLAGS to specify compiler flags)
185
186 * Preprocessor Flags
187         You may specify additional preprocessor flags by setting
188         CPPFLAGS.  For example, if you would like to use headers
189         installed in /usr/local/include, use:
190
191         [env] CPPFLAGS="-I/usr/local/include" ./configure
192
193         You can also use CPPFLAGS to specify preprocessor macros.
194
195         [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
196
197 * Linker Flags
198         You may specify additional linker flags by setting LDFLAGS.
199         For example, if you would like to use libraries installed
200         in /usr/local/lib, use:
201
202         [env] LDFLAGS="-L/usr/local/lib" ./configure
203
204         You can also use CPPFLAGS to specify linker flags:
205
206         [env] LDFLAGS="-Bstatic" ./configure
207
208 * Path
209         You may alter your path to affect configure ability to
210         find (or not find) commands.  For example, to have configure
211         additionally look in /usr/css/bin for commands, use:
212
213         [env] PATH="/usr/css/bin:$PATH" ./configure
214         
215
216 HINTS
217
218 * Platform specific hints are available in doc/install/hints.
219
220 * Use software under installed in /usr/local/{include,lib}
221         [env] \
222                 CPPFLAGS="-I/usr/local/include" \
223                 LDFLAGS="-L/usr/local/lib" \
224                 ./configure
225
226
227 End of OpenLDAP INSTALL file.