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