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. For other systems,
9 please consult {{The OpenLDAP Administrator's Guide}}
10 {{URL:http://www.openldap.org/devel/admin/}}.
12 It is recommended that you read, or at least skim through, ALL of
13 the instructions in this file before attempting to build the
16 It is also recommended your review
17 {{The OpenLDAP Administrator's Guide}}
18 ({{URL:http://www.openldap.org/devel/admin/}}) and
19 the {{Frequently Asked Questions}} ({{URL:http://www.openldap.org/faq/}})
20 pages, in particular the
21 {{Installation section}} ({{URL:http://www.openldap.org/faq/index.cgi?file=8}})
23 {{Platform Hints}} ({{URL:http://www.openldap.org/faq/index.cgi?file=9}})
27 P2: Making and Installing the OpenLDAP Distribution
29 ^ Unpack the distribution and change directory:
31 E: % tar xfz openldap-VERSION.tgz
32 E: % cd openldap-VERSION
34 .(replacing {{EX:VERSION}} with the appropriate version string). If
35 you are reading this file, you probably have already done this!
40 E: % ./configure --help
42 .to list available configuration options. A description of
43 these options is provided in the 'CONFIGURE OPTIONS' section
46 .The {{EX:configure}} script uses environmental variables for
47 determining compiler/linker options. See the 'USING ENVIRONMENT
48 VARIABLES' section for commonly used settings.
50 .These environment variables are used:
53 > CFLAGS C flags -ansi
54 > CPPFLAGS cpp flags -I/path/include -Ddef
55 > LDFLAGS ld flags -L/usr/local/lib
56 > LIBS libraries -llib
57 > PATH command path /usr/local/bin:/usr/bin:/bin
59 .See the 'USING ENVIRONMENT VARIABLES' section for information
60 on how to use the variables.
62 + Configure the build system
64 E: % [env settings] ./configure [options]
66 .If all goes well, the {{EX:configure}} script with automatically
67 detect the appropriate settings. However, you may need to
68 specify options and/or environment variables to obtain desired
79 .If all goes well, the system will build as configured. If not,
80 return to step 3 after reviewing the configuration settings. You
81 may want to consult the {{Platform Hints}} subsection of the {{FAQ}}
82 if you have not done so already.
84 + Test the standalone system
86 .This step requires the standalone LDAP server, {{slapd}}(8),
87 with {{LDBM}} support.
91 .If all goes well, the system has been built as configured. If not,
92 return to step 4 after reviewing your configuration settings. You
93 may want to consult the {{Installation}} section of the {{FAQ}}
94 if you have not done so already.
96 + install the binaries and man pages. You may need to be {{superuser}}
97 to do this (depending on where you are installing things):
99 E: % su root -c 'make install'
103 See the {{Administrator's Guide}} and the manual pages for the
104 individual applications for configuration and use information.
105 You may also want to edit the configuration files used by the
106 various components. These configuration files are located in
107 the OpenLDAP configuration directory (normally
108 {{F:/usr/local/etc/openldap}}).
110 > ldap.conf client defaults
111 > ldapfilter.conf search filter configuration
112 > ldapsearchprefs.conf search object definitions
113 > ldaptemplates.conf display template definitions
114 > slapd.conf Standalone LDAP daemon
115 > schema/*.schema Schema Definitions
117 There are section 5 man pages for these configuration files.
120 P2: Building OpenLDAP For More Than One Platform
122 You can build OpenLDAP for more than one platform from the
124 This is accomplished by using {{make}}(1) {{EX:VPATH}} support.
125 If your {{make}}(1) program is old and doesn't have {{EX:VPATH}}
126 support, install {{BSD Make}} or {{GNU Make}}.
128 Follow these steps for each different platform:
130 ^ Create a directory for the platform object files.
132 E: % mkdir obj-platform
134 + Change your working directory to the platform object directory.
138 + Configure the build system
140 E: % [env settings] ../configure --src-dir=.. [options]
142 . ( replace "{{F:..}}" with the appropriate path )
144 + Continue as above (starting at step 6).
147 P2: CONFIGURE OPTIONS
149 Regrettably, this section has not been written (yet). See
150 "{{EX:./configure --help}}" for current list of options. For general
151 information about how to use "{{EX:configure}}", please read
152 {{F:doc/install/configure}}.
155 P2: USING ENVIRONMENT VARIABLES
157 The configure script will also use your environmental
158 variables for determining compiler/linker options. This can
159 be used to manual specify features and compilation options.
161 Note[label=Warning]: Executables built in your environment may not run
162 in your users' environments. The portability of executables
163 between environments is your responsibility.
165 Supported Environmental Variables:
168 > CFLAGS C flags -ansi
169 > CPPFLAGS cpp flags -I/path/include -Ddef
170 > LDFLAGS ld flags -L/usr/local/lib
171 > LIBS libraries -llib
172 > PATH command path /usr/local/bin:/usr/bin:/bin
174 * Including alternative compilers
176 .Use the {{EX:CC}} environment variable to tell configure to
177 use a specific compiler. For example, to use {{GNU C
178 Compiler}} instead of the default compiler, use:
180 E: % [env] CC=gcc ./configure
182 .You can also use {{EX:CC}} use specific flags with the
183 specified compiler. For example, to require strict
184 {{ANSI C}} using the {{GNU C Compiler}}, use:
186 E: % [env] CC="gcc -ansi -pedantic" ./configure
188 .(you can use {{EX:CFLAGS}} to specify compiler flags)
192 .You may specify additional preprocessor flags by setting
193 {{EX:CPPFLAGS}}. For example, if you would like to use headers
194 installed in {{F:/usr/local/include}}, use:
196 E: % [env] CPPFLAGS="-I/usr/local/include" ./configure
198 .You can also use {{EX:CPPFLAGS}} to specify preprocessor macros.
200 E: % [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
204 .You may specify additional linker flags by setting {{EX:LDFLAGS}}.
205 For example, if you would like to use libraries installed
206 in {{F:/usr/local/lib}}, use:
208 E: % [env] LDFLAGS="-L/usr/local/lib" ./configure
210 .You can also use CPPFLAGS to specify linker flags:
212 E: % [env] LDFLAGS="-Bstatic" ./configure
216 .You may alter your path to affect configure ability to
217 find (or not find) commands. For example, to have configure
218 additionally look in {{F:/usr/css/bin}} for commands, use:
220 E: % [env] PATH="/usr/css/bin:$PATH" ./configure
222 * Using locally installed software
224 .To use software under installed under {{F:/usr/local}}.
227 E: CPPFLAGS="-I/usr/local/include" \
228 E: LDFLAGS="-L/usr/local/lib" \
231 Note: You may have add additional flags if your system
232 supports shared libraries.
235 End of OpenLDAP INSTALL file.