2 # Copyright 1999-2003, The OpenLDAP Foundation, All Rights Reserved.
3 # COPYING RESTRICTIONS APPLY, see COPYRIGHT.
6 {{slapd}}(8) is designed to be run as a stand-alone server. This allows
7 the server to take advantage of caching, manage concurrency issues
8 with underlying databases, and conserve system resources. Running
9 from {{inetd}}(8) is {{NOT}} an option.
12 H2: Command-Line Options
14 {{slapd}}(8) supports a number of command-line options as detailed
15 in the manual page. This section details a few commonly used options.
19 This option specifies an alternate configuration file for slapd.
20 The default is normally {{F:/usr/local/etc/openldap/slapd.conf}}.
24 This option specifies alternative listener configurations. The
25 default is {{EX:ldap:///}} which implies LDAP over TCP on all
26 interfaces on the default LDAP port 389. You can specify
27 specific host-port pairs or other protocol schemes (such as
28 ldaps:// or ldapi://). For example,
29 {{EX:-h "ldaps:// ldap://127.0.0.1:666"}} will create
30 two listeners: one for LDAP over SSL on all interfaces on
31 the default LDAP/SSL port 636, and one for LDAP over TCP on
32 the {{EX:localhost}} ({{loopback}}) interface on port 666.
33 Hosts may be specified using IPv4 dotted-decimal form or
34 using host names. Port values must be numeric.
38 This option specifies the service name used for logging and
39 other purposes. The default service name is {{EX:slapd}}.
41 > -l <syslog-local-user>
43 This option specifies the local user for the {{syslog}}(8)
44 facility. Values can be {{EX:LOCAL0}}, {{EX:LOCAL1}}, {{EX:LOCAL2}}, ...,
45 and {{EX:LOCAL7}}. The default is {{EX:LOCAL4}}. This option
46 may not be supported on all systems.
50 These options specify the user and group, respectively, to run
51 as. {{EX:user}} can be either a user name or uid. {{EX:group}}
52 can be either a group name or gid.
56 This option specifies a run-time directory. slapd will
57 {{chroot}}(2) to this directory after opening listeners but
58 before reading any configuration files or initializing
64 This option sets the slapd debug level to <level>. When level is a
65 `?' character, the various debugging levels are printed and slapd
66 exits, regardless of any other options you give it. Current
69 !block table; colaligns="RL"; align=Center; \
70 title="Table 6.1: Debugging Levels"
72 -1 enable all debugging
74 1 trace function calls
75 2 debug packet handling
76 4 heavy trace debugging
77 8 connection management
78 16 print out packets sent and received
79 32 search filter processing
80 64 configuration file processing
81 128 access control list processing
82 256 stats log connections/operations/results
83 512 stats log entries sent
84 1024 print communication with shell backends
85 2048 print entry parsing debugging
88 You may enable multiple levels by specifying the debug option
89 once for each desired level. Or, since debugging levels are
90 additive, you can do the math yourself. That is, if you want
91 to trace function calls and watch the config file being
92 processed, you could set level to the sum of those two levels
93 (in this case, {{EX: -d 65}}). Or, you can let slapd do the
94 math, (e.g. {{EX: -d 1 -d 64}}). Consult {{F: <ldap_log.h>}} for
97 Note: slapd must have been compiled with {{EX:-DLDAP_DEBUG}}
98 defined for any debugging information beyond the two stats levels
104 In general, slapd is run like this:
106 > /usr/local/etc/libexec/slapd [<option>]*
108 where {{F:/usr/local/etc/libexec}} is determined by {{EX:configure}}
109 and <option> is one of the options described above (or in {{slapd}}(8)).
110 Unless you have specified a debugging level (including level {{EX:0}}),
111 slapd will automatically fork and detach itself from its controlling
112 terminal and run in the background.
116 To kill off slapd safely, you should give a command like this
118 > kill -INT `cat /usr/local/var/slapd.pid`
120 where {{F:/usr/local/var}} is determined by {{EX:configure}}.
122 Killing slapd by a more drastic method may cause information
123 loss or database corruption.