2 # Copyright 1999-2000, The OpenLDAP Foundation, All Rights Reserved.
3 # COPYING RESTRICTIONS APPLY, see COPYRIGHT.
5 P1: Making and Installing the OpenLDAP Distribution
7 This file provides brief instructions on how to build and install
8 OpenLDAP on UNIX (and UNIX-{{like}}) system.
10 It is recommended that you read, or at least skim through, ALL of
11 the instructions in this file before attempting to build the
14 It is also recommended your review
15 {{The OpenLDAP Administrator's Guide}}
16 ({{URL:http://www.openldap.org/doc/admin/}}) and
17 the {{Frequently Asked Questions}} ({{URL:http://www.openldap.org/faq/}})
18 pages, in particular the
19 {{Installation section}} ({{URL:http://www.openldap.org/faq/index.cgi?file=8}})
21 {{Platform Hints}} ({{URL:http://www.openldap.org/faq/index.cgi?file=9}})
25 P2: Making and Installing the OpenLDAP Distribution
27 ^ Unpack the distribution and change directory:
29 E: % tar xfz openldap-VERSION.tgz
30 E: % cd openldap-VERSION
32 .(replacing {{EX:VERSION}} with the appropriate version string). If
33 you are reading this file, you probably have already done this!
38 E: % ./configure --help
40 .to list available configuration options. A description of
41 these options is provided in the 'CONFIGURE OPTIONS' section
44 .The {{EX:configure}} script uses environmental variables for
45 determining compiler/linker options. See the 'USING ENVIRONMENT
46 VARIABLES' section for commonly used settings.
48 .These environment variables are used:
51 > CFLAGS C flags -O -g
52 > CPPFLAGS cpp flags -I/path/include -Ddef
53 > LDFLAGS ld flags -L/usr/local/lib
54 > LIBS libraries -llib
55 > PATH command path /usr/local/bin:/usr/bin:/bin
57 .See the 'USING ENVIRONMENT VARIABLES' section for information
58 on how to use the variables.
60 + Configure the build system
62 E: % [env settings] ./configure [options]
64 .If all goes well, the {{EX:configure}} script with automatically
65 detect the appropriate settings. However, you may need to
66 specify options and/or environment variables to obtain desired
77 .If all goes well, the system will build as configured. If not,
78 return to step 3 after reviewing the configuration settings. You
79 may want to consult the {{Platform Hints}} subsection of the {{FAQ}}
80 if you have not done so already.
82 + Test the standalone system
84 .This step requires the standalone LDAP server, {{slapd}}(8),
85 with {{LDBM}} support.
89 .If all goes well, the system has been built as configured. If not,
90 return to step 4 after reviewing your configuration settings. You
91 may want to consult the {{Installation}} section of the {{FAQ}}
92 if you have not done so already.
94 + install the binaries and man pages. You may need to be {{superuser}}
95 to do this (depending on where you are installing things):
97 E: % su root -c 'make install'
101 See the {{Administrator's Guide}} and the manual pages for the
102 individual applications for configuration and use information.
103 You may also want to edit the configuration files used by the
104 various components. These configuration files are located in
105 the OpenLDAP configuration directory (normally
106 {{F:/usr/local/etc/openldap}}).
108 > ldap.conf client defaults
109 > ldapfilter.conf search filter configuration
110 > ldapsearchprefs.conf search object definitions
111 > ldaptemplates.conf display template definitions
112 > slapd.conf Standalone LDAP daemon
113 > schema/*.schema Schema Definitions
115 There are section 5 man pages for these configuration files.
118 P2: Building OpenLDAP For More Than One Platform
120 You can build OpenLDAP for more than one platform from the
122 This is accomplished by using {{make}}(1) {{EX:VPATH}} support.
123 If your {{make}}(1) program is old and doesn't have {{EX:VPATH}}
124 support, install {{BSD Make}} or {{GNU Make}}.
126 Follow these steps for each different platform:
128 ^ Create a directory for the platform object files.
130 E: % mkdir obj-platform
132 + Change your working directory to the platform object directory.
136 + Configure the build system
138 E: % [env settings] ../configure --src-dir=.. [options]
140 . ( replace "{{F:..}}" with the appropriate path )
142 + Continue as above (starting at step 6).
145 P2: CONFIGURE OPTIONS
147 Regrettably, this section has not been written (yet). See
148 "{{EX:./configure --help}}" for current list of options. For general
149 information about how to use "{{EX:configure}}", please read
150 {{F:doc/install/configure}}.
153 P2: USING ENVIRONMENT VARIABLES
155 The configure script will also use your environmental
156 variables for determining compiler/linker options. This can
157 be used to manual specify features and compilation options.
159 Note[label=Warning]: Executables built in your environment may not run
160 in your users' environments. The portability of executables
161 between environments is your responsibility.
163 Supported Environmental Variables:
166 > CFLAGS C flags -O -g
167 > CPPFLAGS cpp flags -I/path/include -Ddef
168 > LDFLAGS ld flags -L/usr/local/lib
169 > LIBS libraries -llib
170 > PATH command path /usr/local/bin:/usr/bin:/bin
172 * Including alternative compilers
174 .Use the {{EX:CC}} environment variable to tell configure to
175 use a specific compiler. For example, to use {{GNU C
176 Compiler}} instead of the default compiler, use:
178 E: % [env] CC=gcc ./configure
180 .You can also use {{EX:CC}} use specific flags with the
181 specified compiler. For example, to require strict
182 {{ANSI C}} using the {{GNU C Compiler}}, use:
184 E: % [env] CC="gcc -ansi -pedantic" ./configure
186 .(you can use {{EX:CFLAGS}} to specify compiler flags)
190 .You may specify additional preprocessor flags by setting
191 {{EX:CPPFLAGS}}. For example, if you would like to use headers
192 installed in {{F:/usr/local/include}}, use:
194 E: % [env] CPPFLAGS="-I/usr/local/include" ./configure
196 .You can also use {{EX:CPPFLAGS}} to specify preprocessor macros.
198 E: % [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
202 .You may specify additional linker flags by setting {{EX:LDFLAGS}}.
203 For example, if you would like to use libraries installed
204 in {{F:/usr/local/lib}}, use:
206 E: % [env] LDFLAGS="-L/usr/local/lib" ./configure
208 .You can also use CPPFLAGS to specify linker flags:
210 E: % [env] LDFLAGS="-Bstatic" ./configure
214 .You may alter your path to affect configure ability to
215 find (or not find) commands. For example, to have configure
216 additionally look in {{F:/usr/css/bin}} for commands, use:
218 E: % [env] PATH="/usr/css/bin:$PATH" ./configure
220 * Using locally installed software
222 .To use software under installed under {{F:/usr/local}}.
225 E: CPPFLAGS="-I/usr/local/include" \
226 E: LDFLAGS="-L/usr/local/lib" \
229 Note: You may have to add additional flags if your system
230 supports shared libraries.
233 End of OpenLDAP INSTALL file.