LDAP server installation and configuration

Product: 389 Directory Server
Platform: Red Hat Enterprise 64 bit
Default Port: 389

Package:

389-ds-base-1.2.10.2-18.el6_3.x86_64
389-ds-base-libs-1.2.10.2-18.el6_3.x86_64

Install using yum:

yum install 389-ds-base 389-ds-base-libs

Default Location: /etc/dirsrv/

Configuration:

search for setup-ds.pl script which is used to configure installed ldap server. LDAP server doesn't run unless you configure it.

create a user ldap to configure it, it's required by the configuration procedure
# useradd ldap

Run the configure perl script:
# setup-ds.pl

1.Would you like to continue with set up? [yes]:  yes
389 Directory Server system tuning analysis version 10-AUGUST-2007.
2. Would you like to continue? [no]: yes

 Choose a setup type:

   1. Express
       Allows you to quickly set up the servers using the most
       common options and pre-defined defaults. Useful for quick
       evaluation of the products.

   2. Typical
       Allows you to specify common defaults and options.

   3. Custom
       Allows you to specify more advanced options. This is
       recommended for experienced server administrators only.

To accept the default shown in brackets, press the Enter key.

3. Choose a setup type [2]: 3

4. Computer name [example]: example.com


If you have not yet created a user and group for the server,
create this user and group using your native operating
system utilities.

5. System User [nobody]: ldap
6. System Group [nobody]: ldap


[create a separate user if it's not already exist]


7. Directory server network port [389]: 389


8. Directory server identifier [example.com]:  ldap-test


server identifier is the instance name of ldap server, we can have multiple ldap instance running in the same platform, here ldap-test instance will run on the port 389.


9.  The suffix is the root of your directory tree.  The suffix must be a valid DN. It is recommended that you use the dc=domaincomponent suffix convention.

For example, if your domain is example.com,you should use dc=example,dc=com for your suffix.
Setup will create this initial suffix for you, but you may have more than one suffix. Use the directory server utilities to create additional suffixes.
Suffix [dc=example,dc=com]: dc=example,dc=com

this suffix is the root the directory, which is required for all kind of search , modify , add operation in this directory

10. Directory Manager DN [cn=Directory Manager]: cn=Directory Manager

This is the administrator of the directory and bind with instance to do regular operation

Password:
Password (confirm):

please provide 8 length password


11. Do you want to install the sample entries? [no]:no

if you have sample entries, you can write down "yes"

Type the full path and filename, the word suggest, or the word none [suggest]: /tmp/ldap-test.ldif

if you have previously created ldif file ...you can show them here


after setup is done, all setup log is stored in the tmp folder and its location is printed at the end of the setup process like below:

Log file is '/tmp/setup42fIcB.log'

so check this file if you see any error message.

At this point, your configuration is finished, and ldap instance should automatically started and running on port 389



Start/Stop LDAP Server:

# /etc/init.d/dirsrv  start

# /etc/init.d/dirsrv  stop

to start/stop specific instance when you have multiple instance

#/etc/init.d/dirsrv ldap-test start

#/etc/init.d/dirsrv ldap-test stop



Custom Schema load in LDAP server

If you have custom schema than the core schema then to load the schema along with the core schema

create one schema file and keep  it in the directory /etc/dirsrv/ldap-test/schema/

  name the file in conventional way, e.g. 98myschema.ldif  or copy the content of your schema file  and append it in the file 99user.ldif file

restart the ldap server, it will load the new custom schema defined by you








Comments

Popular Posts