📄 runningslapd.sdf
字号:
# $OpenLDAP: pkg/openldap-guide/admin/runningslapd.sdf,v 1.15.2.2 2007/01/02 21:43:43 kurt Exp $# Copyright 1999-2007 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 allowsthe server to take advantage of caching, manage concurrency issueswith underlying databases, and conserve system resources. Runningfrom {{inetd}}(8) is {{NOT}} an option.H2: Command-Line Options{{slapd}}(8) supports a number of command-line options as detailedin the manual page. This section details a few commonly used options.> -f <filename>This option specifies an alternate configuration file for slapd.The default is normally {{F:/usr/local/etc/openldap/slapd.conf}}.> -h <URLs>This option specifies alternative listener configurations. Thedefault is {{EX:ldap:///}} which implies LDAP over TCP on allinterfaces on the default LDAP port 389. You can specifyspecific host-port pairs or other protocol schemes (such asldaps:// or ldapi://). For example,{{EX:-h "ldaps:// ldap://127.0.0.1:666"}} will createtwo listeners: one for LDAP over SSL on all interfaces onthe default LDAP/SSL port 636, and one for LDAP over TCP onthe {{EX:localhost}} ({{loopback}}) interface on port 666.Hosts may be specified using IPv4 dotted-decimal form orusing host names. Port values must be numeric.> -n <service-name>This option specifies the service name used for logging andother purposes. The default service name is {{EX:slapd}}.> -l <syslog-local-user>This option specifies the local user for the {{syslog}}(8)facility. Values can be {{EX:LOCAL0}}, {{EX:LOCAL1}}, {{EX:LOCAL2}}, ...,and {{EX:LOCAL7}}. The default is {{EX:LOCAL4}}. This optionmay not be supported on all systems.> -u user -g groupThese options specify the user and group, respectively, to runas. {{EX:user}} can be either a user name or uid. {{EX:group}}can be either a group name or gid.> -r directoryThis option specifies a run-time directory. slapd will{{chroot}}(2) to this directory after opening listeners butbefore reading any configuration files or initializingany backends..> -d <level> | ?This option sets the slapd debug level to <level>. When level is a`?' character, the various debugging levels are printed and slapdexits, regardless of any other options you give it. Currentdebugging levels are!block table; colaligns="RL"; align=Center; \ title="Table 6.1: Debugging Levels"Level Description-1 enable all debugging0 no debugging1 trace function calls2 debug packet handling4 heavy trace debugging8 connection management16 print out packets sent and received32 search filter processing64 configuration file processing128 access control list processing256 stats log connections/operations/results512 stats log entries sent1024 print communication with shell backends2048 print entry parsing debugging!endblockYou may enable multiple levels by specifying the debug optiononce for each desired level. Or, since debugging levels areadditive, you can do the math yourself. That is, if you wantto trace function calls and watch the config file beingprocessed, you could set level to the sum of those two levels(in this case, {{EX: -d 65}}). Or, you can let slapd do themath, (e.g. {{EX: -d 1 -d 64}}). Consult {{F: <ldap_log.h>}} formore details.Note: slapd must have been compiled with {{EX:-DLDAP_DEBUG}}defined for any debugging information beyond the two stats levelsto be available.H2: Starting slapdIn general, slapd is run like this:> /usr/local/etc/libexec/slapd [<option>]*where {{F:/usr/local/etc/libexec}} is determined by {{EX:configure}}and <option> is one of the options described above (or in {{slapd}}(8)).Unless you have specified a debugging level (including level {{EX:0}}),slapd will automatically fork and detach itself from its controllingterminal and run in the background.H2: Stopping slapdTo kill off slapd safely, you should give a command like this> kill -INT `cat /usr/local/var/slapd.pid`where {{F:/usr/local/var}} is determined by {{EX:configure}}.Killing slapd by a more drastic method may cause informationloss or database corruption.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -