This section shows how to create and delete a Directory Server instance.
Before you can administer data, you must create a Directory Server instance by using command-line tools or the browser interface Directory Service Control Center (DSCC). In DSCC, a Directory Server instance is often referred to simply as a “Directory Server”.
When you create a Directory Server instance, the files and directories required for your Directory Server are created in the instance-path that you specify.
You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.
If you use DSCC to create a new server instance, you can choose to copy some or all server configuration settings from an existing server.
Create a new Directory Server instance and set the instance path.
$ dsadm create instance-path |
You are prompted to set a password for the Directory Manager for this server.
To specify a non-default port number for the server instance, or any other parameter, see the dsadm(1M) man page.
For example, to create a new instance in the directory /local/ds, use this command:
$ dsadm create /local/ds Choose the Directory Manager password: Confirm the Directory Manager password: Use 'dsadm start /local/ds' to start the instance |
Check that the server instance has been created correctly.
$ dsadm info instance-path |
For example:
$ dsadm info /local/ds1 Instance Path: /local/ds1 Owner: user1(group1) Non-secure port: 1389 Secure port: 1636 Bit format: 64-bit State: Running Server PID: 22555 DSCC url: - SMF application name: - Start at boot: Disabled Instance version: D-A00 |
(Optional) If you installed Directory Server using the Java Enterprise System installer or a native package installation, and your OS provides a service management solution, you can enable the server to be managed as a service, as shown in this table.
Operating System |
Command |
---|---|
Solaris 10 |
If you are operating in a Sun Cluster environment, use this command: dsadm enable-service --type CLUSTER instance-path resource-group Otherwise: dsadm enable-service --type SMF instance-path |
Solaris 9 |
If you are operating in a Sun Cluster environment, use this command: dsadm enable-service --type CLUSTER instance-path resource_group Otherwise: dsadm autostart instance-path |
Linux, HP-UX |
dsadm autostart instance-path |
Windows |
dsadm enable-service --type WIN_SERVICE instance-path |
Start Directory Server.
$ dsadm start instance-path |
The server is running but does not contain data or a suffix. Use dsconf to create a suffix.
(Optional) Register the server instance using one of these methods:
Access the URL https://host:6789 and register the server through DSCC.
Use the command dsccreg add-server.
For details, see the dsccreg(1M) man page.
If you want to use a password policy and your Directory Server instance is standalone, or if it belongs to a replication topology that has already been migrated to DS6-only password policy mode, move the instance to that mode.
$ dsconf pwd-compat -h host -p port to-DS6-migration-mode ## Beginning password policy compatibility changes . ## Password policy compatibility changes finished. Task completed (slapd exit code: 0). $ dsconf pwd-compat -h host -p port to-DS6-mode ## Beginning password policy compatibility changes . ## Password policy compatibility changes finished. Task completed (slapd exit code: 0). |
You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.
Stop the Directory Server.
$ dsadm stop instance-path |
If you have previously used DSCC to manage the server, use the command line to unregister the server.
$ dsccreg remove-server /local/ds Enter DSCC administrator's password: /local/ds is an instance of DS Enter password of "cn=Directory Manager" for /local/ds: This operation will restart /local/ds. Do you want to continue ? (y/n) y Unregistering /local/ds from DSCC on localhost. Connecting to /local/ds Disabling DSCC access to /local/ds Restarting /local/ds |
For details, see the dsccreg(1M) man page.
(Optional) If you previously enabled the server instance in a service management solution, disable the server from being managed as a service.
Operating System |
Command |
---|---|
Solaris 10 |
If you are operating in a Sun Cluster environment, use this command: dsadm disable-service --type CLUSTER instance-path Otherwise: dsadm disable-service --type SMF instance-path |
Solaris 9 |
If you are operating in a Sun Cluster environment, use this command: dsadm disable-service --type CLUSTER instance-path Otherwise: dsadm autostart --off instance-path |
Linux, HP-UX |
dsadm autostart --off instance-path |
Windows |
dsadm disable-service --type WIN_SERVICE instance-path |
Delete the server instance.
$ dsadm delete instance-path |
This command removes everything, including the database and the data.
If the instance has been enabled as a service, or if the instance is started automatically at system startup, dsadm delete requires root access.