Non-root users can create server instances.
Refer to the following procedure to create a Directory Server instance using the command line:
Create a new Directory Server instance.
$ dsadm create -p 1389 -P 1636 /local/dsInst Choose the Directory Manager password:secret12 Confirm the Directory Manager password:secret12 Use 'dsadm start /local/dsInst' to start the instance |
The dsInst instance is created under the existing directory, /local/ and secret12 is assigned as the Directory Manager password.
Start the instance.
$ dsadm start /local/dsInst Server started: pid=2845 |
(Optional) Prepare an example suffix.
Create an empty suffix.
$ dsconf create-suffix -p 1389 -e dc=example,dc=com Enter "cn=Directory Manager" password:secret12 |
A suffix with root dc=example,dc=com is created.
Populate the suffix with LDIF data.
$ dsconf import -p 1389 -e\ install-path/resources/ldif/Example.ldif dc=example,dc=com Enter "cn=Directory Manager" password: New data will override existing data of the suffix "dc=example,dc=com". Initialization will have to be performed on replicated suffixes. ... ... ## Closing files... ## Import complete. Processed 160 entries in 4 seconds. (40.00 entries/sec) Task completed (slapd exit code: 0). |
The suffix is populated with sample data from Example.ldif.
Search for data in the new instance.
$ ldapsearch -p 1389 -b dc=example,dc=com "(uid=bjensen)" mail version: 1 dn: uid=bjensen, ou=People, dc=example,dc=com mail: bjensen@example.com |
(Optional) Manage your server instance using DSCC.
The following steps assume that DSCC is installed and pre-configured on dscc-host.
Register the server instance with DSCC:
$ dsccreg add-server -h dscc-host -p dscc-registry-port /local/dsInst Enter DSCC administrator's password: directory-service-pwd /local/dsInst is an instance of DS Enter password of "cn=Directory Manager" for /local/dsInst: secret12 This operation will restart /local/dsInst. Do you want to continue ? (y/n) y Connecting to /local/dsInst (using ldap://127.0.0.1:1389) Enabling DSCC access to /local/dsInst Restarting /local/dsInst Registering /local/dsInst in DSCC on dscc-host:dscc-registry-port. |
List the server that are currently registered into DSCC
# dsccreg list-servers -h dscc-host -p dscc-registry-port Enter DSCC administrator's password: directory-service-pwd Hostname Port sPort Type Owner Flags iPath Description -------------- -------- ----- ---- ----- ----- ---------- ----------- current-host 1389 1636 DS uid /local/dsInst |
(Optional) If you need to use the installation for production and want to clean the system, type the following commands:
# dsccreg remove-server -h dscc-host -p dscc-registry-port /local/dsInst # dsadm delete /local/dsInst |
You can add more suffixes, configure replication with other server instances, tune the instance, and generally proceed with other configuration operations.
See Part I, Directory Server Administration, in Sun Directory Server Enterprise Edition 7.0 Administration Guide for instructions on configuring Directory Server with command-line administration tools.
Similarly, you can create Directory Proxy Server instance using the command line tools. For more information, see Chapter 17, Directory Proxy Server Instances, in Sun Directory Server Enterprise Edition 7.0 Administration Guide.