ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button

Developing A White Pages Service with LDAP and JNDI
Pages: 1, 2, 3, 4, 5, 6, 7

Public LDAP Servers

There are several public LDAP servers you can use over the Internet; the popular of these is probably BigFoot's (ldap://ldap.bigfoot.com); others include ldap://ldap.four11.com and ldap://ldap.InfoSpace.com.



A number of universities in the US also provides LDAP service to search for students or staff members. For a list of university public LDAP services, see eMailman's Public LDAP Servers.

Choosing an LDAP Server

Your organization may already run a directory service, especially if its very large. If not, you probably need to do some research before deciding on one.

The most popular LDAP server today is iPlanet's Directory Server. Others include Novell's NDS eDirectory, Critical Path's Global Directory Server, Computer Associates' eTrust Directory, Siemens' DirX, and Oracle's Oracle Internet Directory. Deciding the one which is best for your situation is often tricky.

NetworkWorld Fusion published a good article last year which compares the performance of many LDAP servers. If it's to be believed, iPlanet is the best performer and also the fastest; it concludes that iPlanet's Directory Server is the best choice for commercial use.

If you only need an LDAP server for testing, you probably want to use something else. Downloads for the latest version of iPlanet's Directory Server (version 5.0 beta) range from 53 MB to 78 MB, depending on your operating system. For the project in this article, I chose the much slimmer LDAP server from OpenLDAP. Even though not the fastest, theis free product is only a 1.52 MB download. OpenLDAP's products are only available for Linux; but once you have seeded it with entries, you can use this article's project code to access any LDAP server on any operating system.

Installing OpenLDAP

You can download OpenLDAP from the project's site. The LDAP server is called slapd (a stand-alone LDAP server). The latest version of slapd is 2.0.7. Other programs downloadable from the Web site are the replication server, some libraries, and a variety of tools.

To install slapd, you first need to download openldap-2_0_7.tgz into the /usr/local/ directory of a Linux system. You can use another directory but you'll need to do some adjustment to the following instructions.

Installation takes the following steps:

  1. Extract the files --

    gunzip -c openldap-2_0_7.tgz | tar xvfB -

    -- into a subdirectory, openldap-2.0.7. If you are using a different version, this subdirectory is called openldap-VERSION.

  2. Assuming that your current working directory is /usr/local, run

    cd openldap-2.0.7
  3. Next, run

    ./configure
  4. Then the following commands:

    make depend
    make
    make test
  5. If everything goes smoothly, you are now ready to install, for which you'll need root access. Run

    su root -c 'make install'

Pages: 1, 2, 3, 4, 5, 6, 7

Next Pagearrow