mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
94 lines
3.2 KiB
Plaintext
94 lines
3.2 KiB
Plaintext
# $OpenLDAP$
|
|
# Copyright 1999-2000, The OpenLDAP Foundation, All Rights Reserved.
|
|
# COPYING RESTRICTIONS APPLY, see COPYRIGHT.
|
|
H1: Running slapd
|
|
|
|
{{Slapd}}(8) is designed to be run as a stand-alone server. This allows
|
|
the server to take advantage of caching, manage concurrency issues
|
|
with underlying databases, and conserve system resources. Running
|
|
from {{inetd}}(8) is {{NOT}} an option.
|
|
|
|
|
|
H2: Command-Line Options
|
|
|
|
{{I:Slapd}} supports the following command-line options.
|
|
|
|
E: -d <level> | ?
|
|
|
|
This option sets the slapd debug level to <level>. When level is a
|
|
`?' character, the various debugging levels are printed and slapd
|
|
exits, regardless of any other options you give it. Current
|
|
debugging levels are
|
|
|
|
E: 1 trace function calls
|
|
E: 2 debug packet handling
|
|
E: 4 heavy trace debugging
|
|
E: 8 connection management
|
|
E: 16 print out packets sent and received
|
|
E: 32 search filter processing
|
|
E: 64 configuration file processing
|
|
E: 128 access control list processing
|
|
E: 256 stats log connections/operations/results
|
|
E: 512 stats log entries sent
|
|
E: 1024 print communication with shell backends
|
|
E: 2048 print entry parsing debugging
|
|
E: 65535 enable all debugging
|
|
|
|
You may enable multiple levels by specifying the debug option
|
|
once for each desired level. Or, since debugging levels are
|
|
additive, you can do the math yourself. That is, if you want
|
|
to trace function calls and watch the config file being
|
|
processed, you could set level to the sum of those two levels
|
|
(in this case, {{EX: -d 65}}). Or, you can let slapd do the
|
|
math, (e.g. {{EX: -d 1 -d 64}}). Consult {{EX: <ldap.h>}} for
|
|
more details.
|
|
|
|
Note: slapd must have been compiled with {{EX:-DLDAP_DEBUG}}
|
|
defined for any debugging information beyond the two stats levels
|
|
to be available.
|
|
|
|
E: -f <filename>
|
|
|
|
This option specifies an alternate configuration file for slapd.
|
|
|
|
E: -p <port>
|
|
|
|
This option specifies an alternate TCP port on which slapd should
|
|
listen for connections. The default port is 389.
|
|
|
|
|
|
H2: Starting slapd
|
|
|
|
In general, slapd is run like this:
|
|
|
|
E: $(ETCDIR)/slapd [<option>]*
|
|
|
|
where ETCDIR has the value you gave in the Make-common file
|
|
during the pre-build configuration, and <option> is one of the
|
|
options described below. Unless you have specified a debugging
|
|
level, slapd will automatically fork and detach itself from its
|
|
controlling terminal and run in the background. Any of the options
|
|
given above can be given to slapd to point it at a different
|
|
configuration file, listen on another port, etc.
|
|
|
|
H2: Stopping slapd
|
|
|
|
To kill off slapd safely, you should give a command like this
|
|
|
|
E: kill -TERM `cat $(ETCDIR)/slapd.pid`
|
|
|
|
Killing slapd by a more drastic method may cause its LDBM
|
|
databases to be corrupted, as it may need to flush various buffers
|
|
before it exits. Note that slapd writes its pid to a file called
|
|
{{EX: slapd.pid}} in the {{EX: ETCDIR}} you configured in
|
|
{{EX: Make-common}}. You can change
|
|
the location of this pid file by changing the {{EX: SLAPD_PIDFILE}}
|
|
variable in {{EX: include/ldapconfig.h.edit}}.
|
|
|
|
{{I: Slapd}} will also write its arguments to a file called
|
|
{{EX: slapd.args}} in the {{EX: ETCDIR}} you configured
|
|
in {{EX: Make-common}}. You can change the
|
|
location of the args file by changing the {{EX: SLAPD_ARGSFILE}}
|
|
variable in {{EX: include/ldapconfig.h.edit}}.
|
|
|