LDAP quick installation

Source: Internet
Author: User
Tags ldapsearch openldap
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 = *)"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.