CentOS Directory Server On CentOS 5.2

The enterprise-class Open Source LDAP server for Linux. It is hardened by real-world use, is full-featured, supports multi-master replication, and already handles many of the largest LDAP deployments in the world. The Centos Directory Server (based on Fedora Directory Server) can be downloaded for free and set up in less than half an hour.


OS Installation

  • Install a minimal server plus the xserver.
  • Important: Set FQDN of your server (/etc/hosts)


CDS Installation

Installing the CentOS Directory Server packages (ref: http://wiki.centos.org/HowTos/DirectoryServerSetup)

1. The CentOS Directory server is currently (30-July-2008) in the Testing Repository for CentOS-5. After downloading the CentOS-Testing.repofile, edit it and add this entry in the [c5-testing] section:


2. Install the directory server with this command:

yum --enablerepo=c5-testing install centos-ds

Note: This fetches about 57 MB of data, openjdk being the biggest (~35Mb). See if you could keep a backup of it while in the process of yum or configure yum to retain the binary packages after installation. (pkg location: /var/cache/yum/...).

3. After install of the directory server, install these required support packages:

yum install xorg-x11-xauth bitstream-vera-fonts dejavu-lgc-fonts urw-fonts

Official Installation documentation: http://www.centos.org/docs/5/html/CDS/install/8.0/.


Post Installation Configuration

Before proceeding any further configure the JAVA environment server that comes with with Java ready installed. You need to change the paths. This is what I did (not nice I know) but you get away with this. Change the name of java/javaws to something else e.g:

mv /usr/bin/java /usr/bin/old_java

mv /usr/bin/javaws /usr/bin/old_javaws

export PATH=$PATH:/usr/lib/jvm/java-1.6.0-openjdk-


Choose from the three options:

1- Express


3- Custom

Follow the guidelines & you're done (it does automatically start the services in the end, i.e. /etc/init.d/dirsrvdirsrv-admin).

After that to get to the Java based GUI console, run:


Congratulations! You're done.


Trouble Shooting

If you need to recreate the instance from all over again, i.e. you messed up in setup-ds-admin.pl, do the following:

Delete these files (instance being the initial instance you created e.g. <servername>):

Stop the services before you delete the stuff (/etc/init.d/dirsrv & dirsrv-admin).

rm -rf all the slapd-<ur instance name> & after this you can re-run the setup-ds-admin.pl.

File or Directory       Location
Log files         /var/log/dirsrv/slapd-instance
Configuration files     /etc/dirsrv/slapd-instance
Instance directory     /usr/lib/dirsrv/slapd-instance
Database files         /var/lib/dirsrv/slapd-instance

Runtime files

  • /var/lock/dirsrv/slapd-instance
  • /var/run/dirsrv/slapd-instance

All trademarks belong to their respective owners..

Share this page:

Suggested articles

12 Comment(s)

Add comment


By: James Fait, Ph.D.

Rather than modifying the contents of the /usr/bin directory, the java vm used can be specified simply by prepending the path to the desired java to the path, rather than appending it.  To do this, enter the following comand (for bash):

export PATH=/usr/lib/jvm/java-1.6.0-openjdk-$PATH

This sets the appropriate Java directory to be searched first, before the rest of the PATH, so the desired java environment and jvm are used.

By: JBulhoes

The less envasive method is using the tools redhat gives us....

Use the alternative system....

With it you can change the java system back and forward.

See the man page. In fact  if you pick up a centos 5.2 base and install java 1.4 and 1.6, the 1.6 stays the default.



It would be interesting to see some pointers on shovelling all this into existing slapd nets, or does it all just do what it says on the tin?


Elaborate on "..shovelling all this into existing slapd nets.."Or are u refering to integrating it with this good ol' openldap ?







Step into the GUI. The import features isn in it somewhere. I remember seeing it. I suppose any fancy frontend, X.500 compliant,  would be incomplete without this feature.


By: Steve Haddon

I don't believe this HowTo is correct.

The test repo file provided doesn't work. The following error is reported when yum is executed:

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=


hooo hoo,
Hold on to ur horses steve boy, lets not jump the gun here.
The test repo is listed at official wiki of centos ppl. Get hold of  centos ppl it doesnt work. I've never said I maintained the centos repos. 

And btw the http://dev.centos.org/centos/ is working.  Plz do refrain from jumping to conclusions without double checking first with issues at ur end.

Note: Guys at centos.org, do accept my humble appreciation for all ur work. Never mind comments like these.

By: Eddie Grenier

Will these instructions work for CentOS 4.7?


I doubt that, I checked their testing repo of centos 4 but it doesn´t seem to exist.

I think ur best bet is to get hold of .src.rpms, build them & then try some of instructions in this tutorial. But no guarantees

Good luck.


By: Anonymous

I found the following for installing a sample program:

alternatives --install /etc/alternatives/editor myeditor /usr/bin/kwrite 90

So for the above it would be something like:

alternatives --install /etc/alternatives/java java  usr/lib/jvm/java-1.6.0-openjdk- 10

alternatives --install /etc/alternatives/javaws javaws  usr/lib/jvm/java-1.6.0-openjdk- 10

Then use the alternatives command to specify the new packages as the default.

 (I really wish the packagers would automatically tell alternatives about the new java, most of the major distributions currently use it (alternatives))

By: Simon Sigre

I found to get the correct JDK version specificed in this guide you had to install the EPEL rep from Fedora; this is also referenced in the OpenJDK website it advises to use this repo for CENTOS5.x+


Then you are able to 'yum install  java-1.6.0-openjdk.i386'