]> git.sur5r.net Git - openldap/blob - doc/guide/admin/quickstart.sdf
Misc cleanup
[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}}.
22 .Pick a place for the LDAP source to live, cd
23 there, and untar it. For example:
24
25 .{{EX:cd /usr/local/src}}
26 .{{EX:gunzip -c openldap-release.tgz | tar xvfB -}}
27 .{{EX:cd ldap}}
28
29 + {{B: Configure the software}}.
30 . You will have to edit two files to configure things for your site.
31
32 .{{EX:vi Make-common}}
33 .{{EX:vi include/ldapconfig.h.edit}}
34
35 . Read the comments in Make-common and configure things
36 appropriately. If you have the Berkeley DB package installed, or the
37 GDBM package, you should set the LDBMBACKEND variable
38 accordingly. Otherwise, the defaults should be OK to get you started.
39
40 . In the include/ldapconfig.h.edit file, be sure to set the DEFAULT_BASE
41 and LDAPHOST variables to something appropriate for your site.
42 Other than that, the defaults should work OK.
43
44 + {{B:Install the software}}.
45 . From the top level LDAP source directory, type:
46
47 .{{EX: su}}
48 .{{EX: make install}}
49
50 . Examine the output of this command carefully to ensure everything is
51 installed properly.
52
53
54 + {{B:Make a configuration file}}.
55 . Create a file called myslapd.conf and
56 enter the following lines into it. See Section 5 for more details on this
57 file.
58
59 .{{EX:referral ldap://ldap.openldap.org}}
60 .{{EX:database ldbm}}
61 .{{EX:suffix "o=<YOUR ORGANIZATION>, c=US"}}
62 .{{EX:rootdn "cn=<YOUR NAME>, o=<YOUR ORGANIZATION>, c=US"}}
63 .{{EX:rootpw secret}}
64
65 .Be sure to replace "<YOUR ORGANIZATION>" with the name of your
66 organization and "<YOUR NAME>" with your name. If you are not in
67 the US, replace "US" with your two-letter country code. The rootdn
68 and rootpw lines are only required if later you want to easily add or
69 modify entries via LDAP.
70
71 + {{B:Create a database}}.
72 . 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 + {{B:See if it works}}.
100 . You can use any LDAP client to do this, but our
101 example uses the ldapsearch tool.
102
103 .{{EX:ldapsearch -h 127.0.0.1 -b 'o=<YOUR ORGANIZATION>, c=US' 'objectclass=*'}}
104
105 . This command will search for and retrieve every entry in the database.
106 Note the use of single quotes around the filter, which prevents the "*"
107 from being interpreted by the shell.
108
109 . You are now ready to add more entries (e.g., using {{I:ldapadd}}(3) or
110 another LDAP client), experiment with various configuration options,
111 backend arrangements, etc. Note that by default, the {{I:slapd}} database
112 grants {{EX:READ}} access to everybody. So if you want to add or modify
113 entries over LDAP, you will have to bind as the rootdn specified in the
114 config file (see Section 5.2.2), or change the default access control
115 (see Section 5.3).
116
117
118 The following sections provide more detailed information on making,
119 installing, and running slapd.
120