The OpenLDAP package provides an open source implementation of the Lightweight Directory Access Protocol.
Download (HTTP): http://gd.tuwien.ac.at/infosys/network/OpenLDAP/openldap-stable/openldap-stable-20060823.tgz
Download (FTP): ftp://ftp.openldap.org/pub/OpenLDAP/openldap-stable/openldap-stable-20060823.tgz
Download MD5 sum: 0fbae4e9279aaa586adcd9f19b66a5ed
Download size: 3.6 MB
Estimated disk space required: 51.8 MB
Estimated build time: 1.8 SBU and approximately 30 minutes to run the tests (processor independent)
The OpenLDAP stable releases are packaged without version numbers in the tarball names. You can see the relationship between the version number and name of the tarball at http://www.openldap.org/software/download/.
Berkeley DB-4.4.20 is recommended (built in LFS) or GDBM-1.8.3
Cyrus SASL-2.1.21 and OpenSSL-0.9.8d
TCP Wrapper-7.6, unixODBC-2.2.11, GMP-4.2, GNU Pth, and OpenSLP
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/openldap
Install OpenLDAP by running the following commands:
./configure --prefix=/usr \ --libexecdir=/usr/sbin \ --sysconfdir=/etc \ --localstatedir=/srv/ldap \ --disable-debug \ --enable-dynamic \ --enable-crypt \ --enable-modules \ --enable-ldap \ --enable-ldbm \ --enable-dyngroup \ --enable-dynlist \ --enable-ppolicy \ --enable-valsort && make depend && make
To test the results, issue: make test.
Now, as the root user:
make install && chmod -v 755 /usr/lib/libl*-2.3.so.0.2.15 && install -v -m755 -d /usr/share/doc/openldap-2.3.27/{drafts,guide,rfc} && install -v -m644 doc/drafts/* /usr/share/doc/openldap-2.3.27/drafts && install -v -m644 doc/rfc/* /usr/share/doc/openldap-2.3.27/rfc && cp -v -R doc/guide/* /usr/share/doc/openldap-2.3.27/guide
--libexecdir=/usr/sbin: Installs the slapd and slurpd daemon programs in /usr/sbin instead of /usr/libexec.
--sysconfdir=/etc: Sets the configuration file directory to avoid the default of /usr/etc.
--localstatedir=/srv/ldap: Sets the directory to use for the LDAP directory database, replication logs and run-time variable data.
--disable-debug: Disable debugging code.
--enable-dynamic: This forces the OpenLDAP libraries to be dynamically linked to the executable programs.
--enable-crypt: Enables crypt(3) passwords.
--enable-modules: Enables dynamic module support.
--enable-ldap: Enables the slapd LDAP backend.
--enable-ldbm: Build slapd with the primary database back end using either Berkeley DB or GNU Database Manager.
--enable-dyngroup: Enables the slapd dynamic group overlay.
--enable-dynlist: Enables the slapd dynamic list overlay.
--enable-ppolicy: Enables the slapd password policy overlay.
--enable-valsort: Enables the slapd value sorting overlay.
make test: Validates the correct build of the package. If you've enabled tcp_wrappers, ensure you add 127.0.0.1 to the slapd line in the /etc/hosts.allow file if you have a restrictive /etc/hosts.deny file.
chmod -v 755 /usr/lib/libl*-2.3.so.0.2.15: This command adds the executable bit to the shared libraries.
--disable-bdb --disable-hdb --with-ldbm-api=gdbm: Pass these parameters to the configure command if you wish to use GDBM instead of Berkeley DB as the primary backend database.
Run ./configure --help to see if there are other parameters you can pass to the configure command to enable other options or dependency packages.
Configuring the slapd and slurpd servers can be complex. Securing the LDAP directory, especially if you are storing non-public data such as password databases, can also be a challenging task. You'll need to modify the /etc/openldap/slapd.conf and /etc/openldap/ldap.conf files to set up OpenLDAP for your particular needs.
Resources to assist you with topics such as choosing a directory configuration, backend and database definitions, access control settings, running as a user other than root and setting a chroot environment include:
The slapd man page
The slapd.conf man page
The OpenLDAP 2.3 Administrator's Guide (also installed locally in /usr/share/doc/openldap-2.3.27/guide/admin)
Documents located at http://www.openldap.org/pub/
To utilize GDBM as the database backend, the “database” entry in /etc/openldap/slapd.conf must be changed from “bdb” to “ldbm”. You can use both by creating an additional database section in /etc/openldap/slapd.conf.
By default, LDAPv2 support is disabled in the slapd.conf file. Once the database is properly set up and Mozilla is configured to use the directory, you must add allow bind_v2 to the slapd.conf file.
To automate the startup of the LDAP server at system bootup, install the /etc/rc.d/init.d/openldap init script included in the blfs-bootscripts-20060910 package using the following command:
make install-openldap1
Note: The init script you just installed only starts the slapd daemon. If you wish to also start the slurpd daemon at system startup, install a modified version of the script using this command:
make install-openldap2
The init script starts the daemons without any parameters. You'll need to modify the script to include the parameters needed for your specific configuration. See the slapd and slurpd man pages for parameter information.
Start the LDAP server using the init script:
/etc/rc.d/init.d/openldap start
Verify access to the LDAP server with the following command:
ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
The expected result is:
# extended LDIF # # LDAPv3 # base <> with scope base # filter: (objectclass=*) # requesting: namingContexts # # dn: namingContexts: dc=my-domain,dc=com # search result search: 2 result: 0 Success # numResponses: 2 # numEntries: 1
Last updated on 2006-10-23 02:18:27 -0500