1. Obtain Software
Http://www.openldap.org/software/download/
Http://www.openldap.org/software/repo.html
2. Decompress
Gunzip-C openldap-VERSION.tgz | tar xfb-
An LDAP subdirectory is generated in the current working directory.
3. read readme and Install carefully
4. Run configure
./Configure
View configure options
./Configure -- Help
5. Compile
Make depend
Make
6. Test the compilation result
CD tests
Make
CD ..
7. Install software
Su root-C make install
8. Create a Server Load balancer configuration file.
Edit the/usr/local/etc/slapd. conf file, which contains the ldbm database definition in the following format
Database ldbm
Suffix "DC = My-domain, Dc = com"
Rootdn "cn = manager, Dc = My-domain, Dc = com"
Rootpw secret
Replace my-domain and COM with the actual domain name, for example:
Database ldbm
Suffix "DC = mydomain, Dc = com"
Rootdn "cn = manager, Dc = mydomain, Dc = com"
Rootpw secret
The sample Server Load balancer. conf is stored in/usr/local/etc/OpenLDAP/Server Load balancer. conf.
9. Start slapd
Su root-C/usr/local/libexec/slapd-F myslapd. conf
Slapd is installed in the "libexecdir" directory specified in the configuration file, usually/usr/local/libexec/slpad.
10. Add an initial entry (entries)
1) Create an ldif File
Edit an ldif file:
DN: DC = My-domain, Dc = com
DC: My-Domain
O: My-organization
Objectclass: Organization
Objectclass: dcobject
DN: Cn = manager, Dc = My-domain, Dc = com
CN: Manager
SN: Manager
Objectclass: person
2) Run ldapadd
Ldapadd-d "cn = manager, Dc = My-domain, Dc = com"-W <myldif. ldif
11. Check whether the job has started to work normally.
Ldapsearch-L-B "DC = My-domain, Dc = com" "(objectclass = *)"
For example:
Ldapsearch-L-B "DC = mydomain, Dc = com"-W "(objectclass = *)"