]> git.sur5r.net Git - openldap/blob - doc/guide/admin/quickstart.sdf
Reorganize tree to better support multiple documents.
[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}}. {{I:Slapd}} is part of the OpenLDAP distribution, which
13 you can retrieve using this URL:
14 .
15 .{{CMD[jump="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release.tgz"]ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release.tgz}}
16 .
17 .If you are reading this guide, you have probably already done this.
18 .  
19
20 + {{B:Untar the distribution}}. Pick a place for the LDAP source to live, cd
21 there, and untar it. For example:
22 .
23 .{{EX: cd /usr/local/src}}
24 .{{EX: gunzip -c openldap-release.tgz | tar xvfB -}}
25 .{{EX: cd ldap}}
26 +{{B: Configure the software}}.
27 .
28 .You will have to edit two files to configure things for your site.
29 .
30 .{{EX: vi Make-common}}
31 .{{EX:vi include/ldapconfig.h.edit}}
32 .
33 .Read the comments in Make-common and configure things
34 .appropriately. If you have the Berkeley DB package installed, or the
35 .GDBM package, you should set the LDBMBACKEND variable
36 .accordingly. Otherwise, the defaults should be OK to get you started.
37 .
38 .In the include/ldapconfig.h.edit file, be sure to set the DEFAULT_BASE
39 .and LDAPHOST variables to something appropriate for your site.
40 .Other than that, the defaults should work OK.
41
42
43 +{{B:Install the software}}. From the top level LDAP source directory,
44 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
54 +{{B:Make a configuration file}}. 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
71
72 +{{B:Create a database}}.  This is a two-step process. Step A is to create
73 .a file (we'll call it myldif) containing the entries you want your database
74 .to contain. Use the following example as a guide, or see Section 7.3 for
75 .more details.
76 .
77 .{{EX:dn: o=<YOUR ORGANIZATION>, c=US}}
78 .{{EX:o: <YOUR ORGANIZATION>}}
79 .{{EX:objectclass: organization}}
80 .
81 .{{EX:dn: cn=<YOUR NAME>, o=<YOUR ORGANIZATION>, c=US}}
82 .{{EX:cn: <YOUR NAME>}}
83 .{{EX:sn: <YOUR LAST NAME>}}
84 .{{EX:mail: <YOUR EMAIL ADDRESS>}}
85 .{{EX:objectclass: person}}
86 .
87 .You can include additional entries and attributes in this file if you want,
88 .or add them later via LDAP.
89 .
90 .Step B is to run this file through a tool to create the slapd database.
91 .
92 .{{EX:$(ETCDIR)/ldif2ldbm -f myslapd.conf -i myldif}}
93 .
94 .Where myslapd.conf is the configuration file you made in step 6, and
95 .myldif is the file you made in step 7A above. By default, the database
96 .files will be created in /usr/tmp. You may specify an alternate directory
97 .via the directory option in the slapd.conf file.
98 .
99
100
101 +{{B:See if it works}}.You can use any LDAP client to do this, but our
102 .example uses the ldapsearch tool.
103 .
104 .{{EX:ldapsearch -h 127.0.0.1 -b 'o=<YOUR ORGANIZATION>, c=US' 'objectclass=*'}}
105 .
106 .This command will search for and retrieve every entry in the database.
107 .Note the use of single quotes around the filter, which prevents the "*"
108 .from being interpreted by the shell.
109 .
110 .You are now ready to add more entries (e.g., using {{I:ldapadd}}(3) or
111 .another LDAP client), experiment with various configuration options,
112 .backend arrangements, etc. Note that by default, the {{I:slapd}} database
113 .grants {{EX:READ}} access to everybody. So if you want to add or modify
114 .entries over LDAP, you will have to bind as the rootdn specified in the
115 .config file (see Section 5.2.2), or change the default access control
116 .(see Section 5.3).
117 .
118
119
120 The following sections provide more detailed information on making,
121 installing, and running slapd.
122
123 PB:
124
125