INSTALL 6.34 KB
Newer Older
1
Making and Installing the OpenLDAP Distribution
Kurt Zeilenga's avatar
Kurt Zeilenga committed
2

3
**
Kurt Zeilenga's avatar
Kurt Zeilenga committed
4
5
** It is recommended that you read or at least skim through ALL of the
** instructions in this file before attempting to build the software.
6
**
Kurt Zeilenga's avatar
Kurt Zeilenga committed
7
** The OpenLDAP Quick Start Guide is available at:
8
9
**    http://www.openldap.org/faq/index.cgi?file=172
**
10
11
12
** The OpenLDAP Installation FAQ is available at:
**    http://www.openldap.org/faq/index.cgi?file=8
**
13
14
** You should also check for platform specific hints located on
** on our web site.
15
**    http://www.openldap.org/faq/index.cgi?file=9
16
**
Kurt Zeilenga's avatar
Kurt Zeilenga committed
17
18
19

If you want to build binaries for more than one platform from a single
source tree, skip ahead to the "Building LDAP For More Than One Platform"
20
section near the end of this file.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
21
22
23
24
25
26

If you simply want to build LDAP for a single machine platform, follow
these steps:

 1. untar the distribution and cd to the top:

27
	% tar xfz openldap-VERSION.tgz
28
	% cd openldap-VERSION
Kurt Zeilenga's avatar
Kurt Zeilenga committed
29

30
31
	replacing VERSION to match the version you downloaded.  If you are
	reading this file, you probably have already done this!
Kurt Zeilenga's avatar
Kurt Zeilenga committed
32

Kurt Zeilenga's avatar
Kurt Zeilenga committed
33
34
 2. Type:
	% ./configure --help
35

Kurt Zeilenga's avatar
Kurt Zeilenga committed
36
37
38
	to list available configuration options.   A description of
	these options is provided in the 'CONFIGURE OPTIONS' section
	below.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
39

40
41
42
	The configure script uses environmental variables for
	determining compiler/linker options.  See the HINTS
	section for commonly used settings. 
Kurt Zeilenga's avatar
Kurt Zeilenga committed
43

Kurt Zeilenga's avatar
Kurt Zeilenga committed
44
45
	These environment variables are used: 
		CC			C Compiler	(cc, ecgs)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
46
		CFLAGS		C Flags		(-O -g)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
47
		CPPFLAGS	CPP Flags	(-I/path/include -Ddef)
48
49
		LDFLAGS		LDFLAGS		(-L/path/lib)
		LIBS		LIBS		(-llib)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
50

51
52
	See the 'USING ENVIRONMENT VARIABLES' section for information
	on how to use the variables. 
Kurt Zeilenga's avatar
Kurt Zeilenga committed
53

54
 3. Configure the build system
Kurt Zeilenga's avatar
Kurt Zeilenga committed
55

Kurt Zeilenga's avatar
Kurt Zeilenga committed
56
	% [env settings] ./configure [options]
Kurt Zeilenga's avatar
Kurt Zeilenga committed
57

Kurt Zeilenga's avatar
Kurt Zeilenga committed
58
59
60
	If all goes well, the configure script with auto-detect the
	appropriate settings.  Use configure enable/with options and/or
	environment variables to obtain desired results.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
61

62
 4. Build dependencies
Kurt Zeilenga's avatar
Kurt Zeilenga committed
63

Kurt Zeilenga's avatar
Kurt Zeilenga committed
64
	% make depend
Kurt Zeilenga's avatar
Kurt Zeilenga committed
65

66
 5. Build the system
Kurt Zeilenga's avatar
Kurt Zeilenga committed
67
68

	% make
Kurt Zeilenga's avatar
Kurt Zeilenga committed
69

Kurt Zeilenga's avatar
Kurt Zeilenga committed
70
    If all goes well, the system will build as configured.  If not,
71
72
73
74
75
	return to step 4 after reviewing the configuration settings.

	You may want to consult the doc/install/hints file for your
	platform.

76
 6. Test the standalone system
77
78
79
80
81

	This step requires the standalone LDAP server (slapd) with
	LDBM support.

	% cd tests
82
	% make test
83
84
85
86
87
88
89

	If all goes well, the system has been built as configured.  If not,
	return to step 4 after reviewing your configuration settings.

	You may want to consult the doc/install/hints file for your
	platform.

90
 7. install the binaries and man pages.  You may need to be superuser to
Kurt Zeilenga's avatar
Kurt Zeilenga committed
91
92
    do this (depending on where you are installing things):

Kurt Zeilenga's avatar
Kurt Zeilenga committed
93
	% su root -c 'make install'
Kurt Zeilenga's avatar
Kurt Zeilenga committed
94

95
    That's it!
Kurt Zeilenga's avatar
Kurt Zeilenga committed
96

97
98
99
100
101
102
	See the man pages for the individual applications for
	information on configuring and using them.  You may also want
	to edit the configuration files used by the various clients.
	These configuration files are located in the OpenLDAP
	configuration directory (normally /usr/local/etc/openldap).

103
104
105
106
107
	Client configuration files:
	  ldap.conf            - client defaults
	  ldapfilter.conf      - search filter configuration
	  ldapsearchprefs.conf - search object definitions
	  ldaptemplates.conf   - display template definitions
Kurt Zeilenga's avatar
Kurt Zeilenga committed
108

109
	Server configuration files:
Kurt Zeilenga's avatar
Kurt Zeilenga committed
110
111
	  slapd.conf           - Standalone LDAP daemon configuration
	  schema/*.schema      - Schema Definitions
112

Kurt Zeilenga's avatar
Kurt Zeilenga committed
113
    There are section 5 man pages for these configuration files.
114

Kurt Zeilenga's avatar
Kurt Zeilenga committed
115
116
117
118

Building LDAP For More Than One Platform

It is now possible to build LDAP for more than one platform from the same
Kurt Zeilenga's avatar
Kurt Zeilenga committed
119
120
121
source tree.  This is accomplished by using make(1) VPATH support.  If
your make(1) program is old and doesn't have VPATH support, install GNU
Make.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
122
123
124

Follow these steps for each different platform:

Kurt Zeilenga's avatar
Kurt Zeilenga committed
125
 1.	Create a directory for the platform object files.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
126

Kurt Zeilenga's avatar
Kurt Zeilenga committed
127
	% mkdir obj-platform
Kurt Zeilenga's avatar
Kurt Zeilenga committed
128

Kurt Zeilenga's avatar
Kurt Zeilenga committed
129
 2. Change your working directory to the platform object directory.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
130

Kurt Zeilenga's avatar
Kurt Zeilenga committed
131
	% cd obj-platform
Kurt Zeilenga's avatar
Kurt Zeilenga committed
132

Kurt Zeilenga's avatar
Kurt Zeilenga committed
133
 3. Configure the build system
Kurt Zeilenga's avatar
Kurt Zeilenga committed
134

Kurt Zeilenga's avatar
Kurt Zeilenga committed
135
136
137
138
139
140
141
142
143
144
	% [env settings] ../configure --src-dir=.. [options]

		( replace ".." with the appropriate path )

 4. Continue as above (starting at step 6).


CONFIGURE OPTIONS

Regrettably, this section has not been written (yet).  See
145
146
147
"./configure --help" for current list of options.  For general
information about how to use "configure", please read:
	doc/install/configure
Kurt Zeilenga's avatar
Kurt Zeilenga committed
148
149


150
USING ENVIRONMENT VARIABLES
Kurt Zeilenga's avatar
Kurt Zeilenga committed
151

Kurt Zeilenga's avatar
Kurt Zeilenga committed
152
153
154
The configure script will also use environmental variables for
determining compiler/linker options.   This can be used to manually
specify features and compilation options.
Kurt Zeilenga's avatar
Kurt Zeilenga committed
155

Kurt Zeilenga's avatar
Kurt Zeilenga committed
156
157
WARNING: Executables built in your environment may not run
	in your users' environments.  The portability of
158
	executables between environments is your responsibility.
159

Kurt Zeilenga's avatar
Kurt Zeilenga committed
160
Supported Environmental Variables
161
	CC			C compiler		(cc, egcc)
Kurt Zeilenga's avatar
Kurt Zeilenga committed
162
	CFLAGS		C flags			(-O -g)
163
	CPPFLAGS	cpp flags		(-I/path/include -Ddef)
164
165
	LDFLAGS		ld flags		(-L/usr/local/lib)
	LIBS		libraries		(-llib)
166
167
168
169
	PATH		command path	/usr/local/bin:/usr/bin:/bin

* Including alternative compilers
	Use the CC environment variable to tell configure to
170
171
172
	use a specific compiler.  For example, to use GNU
	C Compiler instead of the compiler configure choose,
	use:
173

174
	[env] CC=gcc ./configure 
175
176
177
178
179

	You can also use CC use specific flags with the
	specified compiler.  For example, to require strict
	ANSI C using the GNU C Compiler, use:

Kurt Zeilenga's avatar
Kurt Zeilenga committed
180
	[env] CC="gcc -ansi -pedantic" ./configure
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215

	(you can use CFLAGS to specify compiler flags)

* Preprocessor Flags
	You may specify additional preprocessor flags by setting
	CPPFLAGS.  For example, if you would like to use headers
	installed in /usr/local/include, use:

	[env] CPPFLAGS="-I/usr/local/include" ./configure

	You can also use CPPFLAGS to specify preprocessor macros.

	[env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure

* Linker Flags
	You may specify additional linker flags by setting LDFLAGS.
	For example, if you would like to use libraries installed
	in /usr/local/lib, use:

	[env] LDFLAGS="-L/usr/local/lib" ./configure

	You can also use CPPFLAGS to specify linker flags:

	[env] LDFLAGS="-Bstatic" ./configure

* Path
	You may alter your path to affect configure ability to
	find (or not find) commands.  For example, to have configure
	additionally look in /usr/css/bin for commands, use:

	[env] PATH="/usr/css/bin:$PATH" ./configure
	

HINTS

216
217
218
* Platform specific hints are available in doc/install/hints.

* Use software under installed in /usr/local/{include,lib}
219
220
221
222
223
	[env] \
		CPPFLAGS="-I/usr/local/include" \
		LDFLAGS="-L/usr/local/lib" \
		./configure

224

Kurt Zeilenga's avatar
Kurt Zeilenga committed
225
226
---
$OpenLDAP$