JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Fusion Middleware Command-Line Usage Guide for Oracle Unified Directory 11g Release 1 (11.1.1)
search filter icon
search icon

Document Information

Preface

1.  Server Administration Commands

create-rc-script

Synopsis

Description

Options

General Options

Examples

Code Generated by the create-rc-script Command

Exit Codes

Location

Related Commands

dsconfig

Synopsis

Description

Help Subcommands

General Subcommands

Core Server Subcommands

Database Subcommands

Logging Subcommands

Replication Subcommands

Security Subcommands

User Management Subcommands

Options

LDAP Connection Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Location

Related Commands

dsreplication

Synopsis

Description

Server Subcommands

Options

Configuration Options

LDAP Connection Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Location

Related Commands

ds2oud

Synopsis

Description

Options

Oracle Directory Server Enterprise Edition LDAP Connection Options

Oracle Unified Directory LDAP Connection Options

Command Input/Output Options

General Options

Examples

Exit Codes

Location

Related Commands

dps2oud

Synopsis

Description

Options

LDAP Connection Options

General Options

Examples

Exit Codes

Location

Related Commands

gicadm

Synopsis

Description

Options

LDAP Connection Options

Command Input/Output Options

General Options

Examples

Exit Codes

Location

Related Commands

manage-tasks

Synopsis

Description

Options

LDAP Connection Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Location

Related Commands

oud-replication-gateway-setup

Synopsis

Description

Options

Replication Gateway Configuration Options

Oracle Directory Server Enterprise Edition Server Options

Replication Gateway Security Options

Oracle Unified Directory Server Options

Secure Connection Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Log Files

Location

Related Commands

oud-setup

Synopsis

Description

Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Log Files

Location

Related Commands

oud-proxy-setup

Synopsis

Description

Options

Command Input/Output Options

General Options

Examples

Exit Codes

Log Files

Location

Related Commands

start-ds

Synopsis

Description

Options

Command Input/Output Options

General Options

Examples

Exit Codes

Location

Related Commands

status

Synopsis

Description

LDAP Connection Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Location

stop-ds

Synopsis

Description

Options

LDAP Connection Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Location

Related Commands

uninstall

Synopsis

Description

Removing a Directory Server

Options

LDAP Connection Options

Removing a Proxy Server

Options

LDAP Connection Options

Removing a Replication Gateway Server

Options

Gateway Connection Options

Oracle Unified Directory Server Connection Options

Oracle Directory Server Enterprise Edition Server Connection Options

Secure Connection Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Log Files

Location

Related Commands

windows-service

Synopsis

Description

Command Options

General Options

Examples

Exit Codes

Location

Related Commands

2.  Data Administration Commands

3.  LDAP Client Commands

4.  Other Commands

5.  General Command-Line Usage Information

create-rc-script

The create-rc-script command generates a shell script to start, stop, and restart the directory server.

Synopsis

create-rc-script [options]

Description

The create-rc-script command can be used to generate a shell script to start, stop, and restart the directory server. You can update the resulting script to suit the needs of your directory service. This command is available for UNIX or Linux systems only.


Note - On Solaris 10 systems, the functionality provided by RC scripts has been replaced by the Service Management Facility (SMF).


create-rc-script uses OPENDS_JAVA_* variables and JAVA_* variables.

For more information, see System Requirements and Certification in Oracle Fusion Middleware Installation Guide for Oracle Unified Directory.

Options

The create-rc-script command accepts an option in either its short form (for example, -f filename) or its long form equivalent (for example, --outputFile filename).

-f, --outputFile filename

Specify the path to the output file.

-j, --javaHome javaHomePath

Specify the path to the Java installation that should be used to run the server.

-J, --javaArgs javaArgs

Specify the set of arguments that should be passed to the JVM when running the server.

-u, --userName userName

Specify the name of the user account under which the server should run. The user account must have the appropriate permissions to run the script.

General Options

--version

Display the version information for the directory server.

-?, -H, --help

Display command-line usage information for the create-rc-script command.

Examples

The following examples show how to use the create-rc-script command.

For more information, see System Requirements and Certification in Oracle Fusion Middleware Installation Guide for Oracle Unified Directory.

Example 1-1 Creating the Script

The following command generates the script to start, stop, and restart the directory server. It creates the file called myscript, specified by the -f option:

$ create-rc-script -f myscript

Example 1-2 Starting the Directory Server by Using the New Script

The following command uses the newly created script (see previous example) to start the directory server.

$ myscript start

Example 1-3 Stopping the Directory Server by Using the New Script

The following command uses the newly created script (see first example) to stop the directory server.

$ myscript stop

Example 1-4 Restarting the Directory Server by Using the New Script

The following command uses the newly created script (see first example) to restart the directory server.

$ myscript restart

Example 1-5 Specifying JAVA_HOME and JAVA_ARGS in the Script

The following command uses the -u (--userName), -j (--javaHome) and -J (--javaArgs) options.

$ create-rc-script -f myscript -u sysAdmin -j /usr/java -J "-Xms128m -Xmx128m"

Code Generated by the create-rc-script Command

The create-rc-script command from the example above generates the following code:

# /bin/sh
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# https://OpenDS.dev.java.net/OpenDS.LICENSE.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
# add the following below this CDDL HEADER, with the fields enclosed
# by brackets "[]" replaced with your own identifying information:
#      Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END

# Set the path to the OpenDS instance to manage
INSTANCE_ROOT="/usr/local/opends/standalone/ds-server-1"
export INSTANCE_ROOT

# Specify the path to the Java installation to use
OPENDS_JAVA_HOME="/usr/java"
export OPENDS_JAVA_HOME

# Specify arguments that should be provided to the JVM
JAVA_ARGS="-Xms128m -Xmx128m"
export JAVA_ARGS

# Determine what action should be performed on the server
case "${1}" in
start)
/bin/su sysAdmin "${INSTANCE_ROOT}/bin/start-ds" --quiet
exit ${?}
;;
stop)
/bin/su sysAdmin "${INSTANCE_ROOT}/bin/stop-ds" --quiet
exit ${?}
;;
restart)
/bin/su sysAdmin "${INSTANCE_ROOT}/bin/stop-ds" --restart --quiet
exit ${?}
;;
*)

echo "Usage:  $0 { start | stop | restart }"
exit 1
;;
esac

Exit Codes

An exit code of 0 indicates success. A non-zero exit code indicates that an error occurred.

Location

The create-rc-script command is located at this path:

UNIX and Linux: instance-dir/OUD/bin

Related Commands

start-ds

stop-ds