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