1 Making and Installing the OpenLDAP Distribution
2 ===============================================
4 This file provides brief instructions on how to build and install
5 OpenLDAP on UNIX (and UNIX-like) system.
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.
10 It is also recommended your 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)
17 Making and Installing the OpenLDAP Distribution
18 -----------------------------------------------
20 1. Unpack the distribution and change directory:
22 % tar xfz openldap-VERSION.tgz
25 (replacing VERSION with the appropriate version string). If you
26 are reading this file, you probably have already done this!
32 to list available configuration options. A description of these
33 options is provided in the 'CONFIGURE OPTIONS' section below.
35 The configure script uses environmental variables for determining
36 compiler/linker options. See the 'USING ENVIRONMENT VARIABLES'
37 section for commonly used settings.
39 These environment variables are used:
43 CPPFLAGS cpp flags -I/path/include -Ddef
44 LDFLAGS ld flags -L/usr/local/lib
46 PATH command path /usr/local/bin:/usr/bin:/bin
48 See the 'USING ENVIRONMENT VARIABLES' section for information on
49 how to use the variables.
51 3. Configure the build system
53 % [env settings] ./configure [options]
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.
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.
72 6. Test the standalone system
74 This step requires the standalone LDAP server, slapd(8), with
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.
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):
87 % su root -c 'make install'
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).
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
104 There are section 5 man pages for these configuration files.
106 Building OpenLDAP For More Than One Platform
107 --------------------------------------------
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
114 Follow these steps for each different platform:
116 1. Create a directory for the platform object files.
120 2. Change your working directory to the platform object directory.
124 3. Configure the build system
126 % [env settings] ../configure --src-dir=.. [options]
128 ( replace ".." with the appropriate path )
130 4. Continue as above (starting at step 6).
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.
140 USING ENVIRONMENT VARIABLES
141 ---------------------------
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.
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.
151 Supported Environmental Variables:
155 CPPFLAGS cpp flags -I/path/include -Ddef
156 LDFLAGS ld flags -L/usr/local/lib
158 PATH command path /usr/local/bin:/usr/bin:/bin
160 o Including alternative compilers
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:
166 % [env] CC=gcc ./configure
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
172 % [env] CC="gcc -ansi -pedantic" ./configure
174 (you can use CFLAGS to specify compiler flags)
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:
182 % [env] CPPFLAGS="-I/usr/local/include" ./configure
184 You can also use CPPFLAGS to specify preprocessor macros.
186 % [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
190 You may specify additional linker flags by setting LDFLAGS. For
191 example, if you would like to use libraries installed in
194 % [env] LDFLAGS="-L/usr/local/lib" ./configure
196 You can also use CPPFLAGS to specify linker flags:
198 % [env] LDFLAGS="-Bstatic" ./configure
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:
206 % [env] PATH="/usr/css/bin:$PATH" ./configure
208 o Using locally installed software
210 To use software under installed under /usr/local.
213 CPPFLAGS="-I/usr/local/include" \
214 LDFLAGS="-L/usr/local/lib" \
217 Note: You may have to add additional flags if your system supports
220 End of OpenLDAP INSTALL file.
222 $OpenLDAP: pkg/openldap-guide/release/install.sdf,v 1.9 2000/08/22