CentOS Directory Server On CentOS 5.2

Want to support HowtoForge? Become a subscriber!
 
Submitted by awan (Contact Author) (Forums) on Mon, 2008-08-04 19:07. :: CentOS

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:

exclude=java-1.7.0-icedtea

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-1.6.0.0/jre/bin

setup-ds-admin.pl

Choose from the three options:

1- Express

2-Typical

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:

centos-idm-console

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..


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Simon Sigre (not registered) on Thu, 2009-01-29 23:49.

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+

http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm

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

Submitted by Anonymous (not registered) on Thu, 2009-01-29 10:29.

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-1.6.0.0/jre/bin/java 10

alternatives --install /etc/alternatives/javaws javaws  usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/javaws 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))

Submitted by Eddie Grenier (not registered) on Sat, 2008-12-13 23:08.
Will these instructions work for CentOS 4.7?
Submitted by awan (registered user) on Fri, 2008-12-19 07:10.

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.

-0z

Submitted by Steve Haddon (not registered) on Mon, 2008-10-27 10:26.

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=

Submitted by awan (registered user) on Tue, 2008-10-28 11:35.

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.
--
Oz 

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

Submitted by tjd (registered user) on Sun, 2008-10-12 12:05.
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?
Submitted by awan (registered user) on Wed, 2008-10-29 04:55.

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

-
Oz

Submitted by tjd (registered user) on Thu, 2008-11-06 06:54.

precisely

 

 

Submitted by awan (registered user) on Fri, 2008-11-07 10:46.

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.

-Oz

Submitted by James Fait, Ph.D. (not registered) on Mon, 2008-09-22 16:45.

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-1.6.0.0/jre/bin:$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.

Submitted by JBulhoes (not registered) on Wed, 2008-12-24 03:44.

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.