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