OpenLDAP Faq-O-Matic : OpenLDAP Software FAQ : Configuration : SLAPD Configuration : Backends : The BDB/HDB backend (How do I setup/configure back-bdb/back-hdb?) : How do I setup the BDB backend? | |
BDB Backend Configuration
The Berkeley Database backend is the prefered database backend to use with OpenLDAP. However, it requires a lot of (correct) configuration in order for the backend to perform well. Below are the configuration options I've found to work. I've broken up my configuration into three sections
Basic Configuration
Index Configuration
Basic BDB Backend Configuration # # Base Database Type and Domain # database bdb suffix "dc=somedomain,dc=com" # # Distinguished Name allowed complete # access to database backend. # # This section should be removed after # the initial databases have been # created and loaded. # rootdn "cn=Manager,dc=somedomain,dc=com" rootpw {CRYPT}<some crypt password> # # Database Directory # directory /opt/openldap/var/bdb-data # # Set the entry cache size to 5000. # cachesize 5000 # # Set transactional checkpoint. # checkpoint 512 720database <dbtype> The database type that this backend uses. Since we are using Berkeley Database we define this to be bdb .
suffix <dn suffix>
rootpw <password>
directory <path>
cachesize <num entries>
checkpoint <kbyte> <min> It should be noted that the longer the interval between checkpoints, the more likely it is that changes to your databases will be unrecoverable in the event of system failure. However, if you don't make changes to your databases that often, then this parameter might reduce your disk activity.
DB_CONFIG File
| |
See also: Why isn't all of this essential Sleepycat's BerkeleyDB documentation integrated directly into OpenLDAP's documentation?
| |
For more information on setting up the BDB backend, including directives that control BDB database parameters, read "man slapd-bdb".
| |
The DB_CONFIG document has moved to http://www.oracle.com/technology/documentation/berkeley-db/db/ref/env/db_config.html
| |
[Append to This Answer] | |
trevorwarren@yahoo.com, Kurt@OpenLDAP.org, delirium@spamcop.net, Michael.Heyman@Sparta.com |
Next: | How do I configure the BDB backend? |
|