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