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. For other systems, please
6 consult The OpenLDAP Administrator's Guide
7 http://www.openldap.org/doc/admin/.
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.
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)
19 Making and Installing the OpenLDAP Distribution
20 -----------------------------------------------
22 1. Unpack the distribution and change directory:
24 % tar xfz openldap-VERSION.tgz
27 (replacing VERSION with the appropriate version string). If you
28 are reading this file, you probably have already done this!
34 to list available configuration options. A description of these
35 options is provided in the 'CONFIGURE OPTIONS' section below.
37 The configure script uses environmental variables for determining
38 compiler/linker options. See the 'USING ENVIRONMENT VARIABLES'
39 section for commonly used settings.
41 These environment variables are used:
45 CPPFLAGS cpp flags -I/path/include -Ddef
46 LDFLAGS ld flags -L/usr/local/lib
48 PATH command path /usr/local/bin:/usr/bin:/bin
50 See the 'USING ENVIRONMENT VARIABLES' section for information on
51 how to use the variables.
53 3. Configure the build system
55 % [env settings] ./configure [options]
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.
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.
74 6. Test the standalone system
76 This step requires the standalone LDAP server, slapd(8), with
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.
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):
89 % su root -c 'make install'
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).
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
106 There are section 5 man pages for these configuration files.
108 Building OpenLDAP For More Than One Platform
109 --------------------------------------------
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
116 Follow these steps for each different platform:
118 1. Create a directory for the platform object files.
122 2. Change your working directory to the platform object directory.
126 3. Configure the build system
128 % [env settings] ../configure --src-dir=.. [options]
130 ( replace ".." with the appropriate path )
132 4. Continue as above (starting at step 6).
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.
142 USING ENVIRONMENT VARIABLES
143 ---------------------------
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.
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.
153 Supported Environmental Variables:
157 CPPFLAGS cpp flags -I/path/include -Ddef
158 LDFLAGS ld flags -L/usr/local/lib
160 PATH command path /usr/local/bin:/usr/bin:/bin
162 o Including alternative compilers
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:
168 % [env] CC=gcc ./configure
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
174 % [env] CC="gcc -ansi -pedantic" ./configure
176 (you can use CFLAGS to specify compiler flags)
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:
184 % [env] CPPFLAGS="-I/usr/local/include" ./configure
186 You can also use CPPFLAGS to specify preprocessor macros.
188 % [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
192 You may specify additional linker flags by setting LDFLAGS. For
193 example, if you would like to use libraries installed in
196 % [env] LDFLAGS="-L/usr/local/lib" ./configure
198 You can also use CPPFLAGS to specify linker flags:
200 % [env] LDFLAGS="-Bstatic" ./configure
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:
208 % [env] PATH="/usr/css/bin:$PATH" ./configure
210 o Using locally installed software
212 To use software under installed under /usr/local.
215 CPPFLAGS="-I/usr/local/include" \
216 LDFLAGS="-L/usr/local/lib" \
219 Note: You may have add additional flags if your system supports shared
222 End of OpenLDAP INSTALL file.
224 $OpenLDAP: pkg/openldap-guide/release/install.sdf,v 1.8 2000/08/22