]> git.sur5r.net Git - openldap/blob - INSTALL
Update notices to use "OpenLDAP Foundation" instead of
[openldap] / INSTALL
1 Making and Installing the OpenLDAP Distribution
2
3 ** It is recommended that you read or at least skim through ALL of the
4 ** instructions in this file before attempting to build the software.
5
6 If you want to build binaries for more than one platform from a single
7 source tree, skip ahead to the "Building LDAP For More Than One Platform"
8 section near the end of this file.
9
10 If you simply want to build LDAP for a single machine platform, follow
11 these steps:
12
13  1. untar the distribution and cd to the top:
14
15         % tar xfz ldap-stable.tgz
16         % cd ldap
17
18     If you are reading this file, you probably have already done this!
19
20
21  2. Type:
22         % make Make-common
23
24         to copy Make-common.dist to Make.common. 
25
26  3. edit the files Make-common and include/ldapconfig.h.edit to configure
27     the software for your site (the files are well-commented):
28
29         % vi Make-common
30         % vi include/ldapconfig.h.edit
31
32     Note that you should NOT need to edit the Makefile located at the
33     top of the distribution.
34
35     If you just want to see if things will build, you can leave the
36     configuration alone and change it later.  You may want to consult
37         the appropriate platform makefile (build/*/Make-platform) for
38         platform-specific defaults.
39
40     If you have the ISODE package built and want to build the
41     LDAP-to-X.500 server (ldapd), be sure to uncomment the appropriate
42     lines near the end of the Make-common file.  By default only the
43     stand-alone server, LDAP libraries and client software are built.
44
45  3. make the software:
46
47         % make
48
49     If all goes well, then make will figure out what platform you are on,
50     pick a compiler to use, construct Makefiles, and build everything.
51     If you see a message like "unknown platform..." LDAP has probably not
52     been set up to build on your machine.  See the file build/PORTS for
53     hints on what to do in that case.
54
55     Note that if your make does not use the Bourne (sh) shell by
56     default when executing internal scripts (reportedly the case on SGI
57     machines at least), you will need to run the make explicitly from
58     within a Bourne shell.  If you a syntax error such as "Missing ]"
59     when you do the make under your usual shell, try this:
60
61         % sh
62         $ make
63
64     If you don't like the some of the platform-specific options chosen
65     by the automatic build process (such as the compiler to use, etc),
66     you can intervene and edit them before anything is actually compiled
67     by explicitly doing a "make platform" step, editing the .make-platform
68     file (actually a link to the file to be edited), and then doing a
69     regular make:
70
71         % make platform
72         % vi .make-platform
73         % make
74
75     If you want to choose the build platform yourself from among those that
76     the distribution supports, cd to the appropriate directory underneath
77     build/platforms and make from there.  For example, if you are on a
78     machine running SunOS 4.1.4 and you want to force the use of the cc
79     compiler, you would do this:
80
81         % cd build/platforms/sunos4-cc
82         % make
83
84     If you want to run some simple tests after the build is complete, you
85     can do this:
86
87         % make test
88
89  4. install the binaries and man pages.  You may need to be superuser to
90     do this (depending on where you are installing things):
91
92         % su
93         # make install
94
95     That's it!  See the man pages for the individual clients for information
96     on configuring and using them.  Eventually you will probably want to
97     edit the configuration files used by the various clients (installed in
98     the LDAP etc directory).  The files are:
99
100         ldapfilter.conf      - search filter configuration
101         ldapfriendly         - mapping of X.500 names to human-friendly names
102         ldapsearchprefs.conf - search object definitions
103         ldaptemplates.conf   - display template definitions
104
105     There are section 5 man pages for all of these files.
106
107
108 Building LDAP For More Than One Platform
109
110 It is now possible to build LDAP for more than one platform from the same
111 source tree.  This is accomplished by some rules in the Makefiles that
112 create a shadow (linked) directory tree where the binaries are placed.
113
114 Follow these steps for each different platform:
115
116  1. move to the directory that matches the platform and compiler you
117     want to build for and type make.  The directories are all located
118     underneath the build/platforms directory.  If your platform is not
119     there, you may need to do a port - see the build/PORTS file for
120     more information.  For a Sun running SunOS 4.1.4, you might do
121     this:
122
123         % cd build/platforms/sunos4-cc
124         % make links
125
126     This will create a linked source area.
127
128
129  2. move to the new directory and make as for a single platform.  Follow steps
130     1-4 above to accomplish this.  For example:
131
132         % cd obj-sunos4-cc
133         % make
134
135     That's all there is to it.  You can also create the linked source area(s)
136     by just typing "make links" at the top of the distribution, in which case
137     the Makefile will try to automatically determine the platform and
138     compiler.
139
140
141 End of OpenLDAP INSTALL file.