]> git.sur5r.net Git - openldap/blob - doc/guide/admin/quickstart.sdf
Cleanup formatting. Reorganization preamble information for sharing
[openldap] / doc / guide / admin / quickstart.sdf
1 # Copyright 1999, The OpenLDAP Foundation, All Rights Reserved.
2 # COPYING RESTRICTIONS APPLY, see COPYRIGHT.
3
4 H1: A Quick-Start Guide to Running slapd
5
6 This section provides a quick step-by-step guide to building,
7 installing and running {{I:slapd}}. It is intended to provide users with a
8 simple and quick way to get started only. If you intend to run slapd
9 seriously, you should read the rest of this guide.
10
11
12 ^ {{B:Get the software}}.
13 . {{I:Slapd}} is part of the OpenLDAP distribution, which
14 you can retrieve using this URL:
15
16 ..{{URL: ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release.tgz}}
17
18 .If you are reading this guide, you have probably already done this.
19
20
21 + {{B:Untar the distribution}}. Pick a place for the LDAP source to live, cd
22 there, and untar it. For example:
23
24 .{{EX: cd /usr/local/src}}
25 .{{EX: gunzip -c openldap-release.tgz | tar xvfB -}}
26 .{{EX: cd ldap}}
27
28 + {{B: Configure the software}}.
29 . You will have to edit two files to configure things for your site.
30
31 .{{EX:vi Make-common}}
32 .{{EX:vi include/ldapconfig.h.edit}}
33
34 . Read the comments in Make-common and configure things
35 appropriately. If you have the Berkeley DB package installed, or the
36 GDBM package, you should set the LDBMBACKEND variable
37 accordingly. Otherwise, the defaults should be OK to get you started.
38
39 . In the include/ldapconfig.h.edit file, be sure to set the DEFAULT_BASE
40 and LDAPHOST variables to something appropriate for your site.
41 Other than that, the defaults should work OK.
42
43 + {{B:Install the software}}.
44 . From the top level LDAP source directory, type:
45
46 .{{EX: su}}
47 .{{EX: make install}}
48
49 . Examine the output of this command carefully to ensure everything is
50 installed properly.
51
52
53 + {{B:Make a configuration file}}.
54 . Create a file called myslapd.conf and
55 enter the following lines into it. See Section 5 for more details on this
56 file.
57
58 .{{EX:referral ldap://ldap.openldap.org}}
59 .{{EX:database ldbm}}
60 .{{EX:suffix "o=<YOUR ORGANIZATION>, c=US"}}
61 .{{EX:rootdn "cn=<YOUR NAME>, o=<YOUR ORGANIZATION>, c=US"}}
62 .{{EX:rootpw secret}}
63
64 .Be sure to replace "<YOUR ORGANIZATION>" with the name of your
65 organization and "<YOUR NAME>" with your name. If you are not in
66 the US, replace "US" with your two-letter country code. The rootdn
67 and rootpw lines are only required if later you want to easily add or
68 modify entries via LDAP.
69
70 + {{B:Create a database}}.
71 . This is a two-step process. Step A is to create
72 a file (we'll call it myldif) containing the entries you want your database
73 to contain. Use the following example as a guide, or see Section 7.3 for
74 more details.
75
76 .{{EX:dn: o=<YOUR ORGANIZATION>, c=US}}
77 .{{EX:o: <YOUR ORGANIZATION>}}
78 .{{EX:objectclass: organization}}
79 .
80 .{{EX:dn: cn=<YOUR NAME>, o=<YOUR ORGANIZATION>, c=US}}
81 .{{EX:cn: <YOUR NAME>}}
82 .{{EX:sn: <YOUR LAST NAME>}}
83 .{{EX:mail: <YOUR EMAIL ADDRESS>}}
84 .{{EX:objectclass: person}}
85
86 .You can include additional entries and attributes in this file if you want,
87 or add them later via LDAP.
88
89 .Step B is to run this file through a tool to create the slapd database.
90
91 .{{EX:$(ETCDIR)/ldif2ldbm -f myslapd.conf -i myldif}}
92
93 .Where myslapd.conf is the configuration file you made in step 6, and
94 myldif is the file you made in step 7A above. By default, the database
95 files will be created in /usr/tmp. You may specify an alternate directory
96 via the directory option in the slapd.conf file.
97
98 + {{B:See if it works}}.
99 . You can use any LDAP client to do this, but our
100 example uses the ldapsearch tool.
101
102 .{{EX:ldapsearch -h 127.0.0.1 -b 'o=<YOUR ORGANIZATION>, c=US' 'objectclass=*'}}
103
104 . This command will search for and retrieve every entry in the database.
105 Note the use of single quotes around the filter, which prevents the "*"
106 from being interpreted by the shell.
107
108 . You are now ready to add more entries (e.g., using {{I:ldapadd}}(3) or
109 another LDAP client), experiment with various configuration options,
110 backend arrangements, etc. Note that by default, the {{I:slapd}} database
111 grants {{EX:READ}} access to everybody. So if you want to add or modify
112 entries over LDAP, you will have to bind as the rootdn specified in the
113 config file (see Section 5.2.2), or change the default access control
114 (see Section 5.3).
115
116
117 The following sections provide more detailed information on making,
118 installing, and running slapd.
119