slapd.conf 文件由三种类型的配置信息组成:全局的、后端特定的和数据库特定的。全局信息首先指定,然后是与特定后端类型相关联的信息,最后是与特定数据库实例相关联的信息。
全局指令可以在后端和/或数据库指令中被覆盖,后端指令可以被数据库指令覆盖。
空行和以“#”字符开头的注释行将被忽略。如果一行以空格开头,则它被视为前一行的延续(即使前一行是注释)。slapd.conf 的通用格式如下
# global configuration directives <global config directives> # backend definition backend <typeA> <backend-specific directives> # first database definition & config directives database <typeA> <database-specific directives> # second database definition & config directives database <typeB> <database-specific directives> # second "typeA" database definition & config directives database <typeA> <database-specific directives> # subsequent backend & database definitions & config directives ... |
配置指令可以接受参数。 如果是这样,它们以空格分隔。 如果参数包含空格,则该参数应括在双引号中“像这样”。 如果参数包含双引号或反斜杠字符“\”,则该字符前面应加上反斜杠字符“\”。
该发行版包含一个示例配置文件,该文件将安装在 /usr/local/etc/openldap 目录中。 许多包含模式定义(属性类型和对象类)的文件也提供在 /usr/local/etc/openldap/schema 目录中。