<?xml version="1.0" encoding="UTF-8"?>
<!--
! CCPL HEADER START
!
! This work is licensed under the Creative Commons
! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
! To view a copy of this license, visit
! http://creativecommons.org/licenses/by-nc-nd/3.0/
! or send a letter to Creative Commons, 444 Castro Street,
! Suite 900, Mountain View, California, 94041, USA.
!
! You can also obtain a copy of the license at
! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! If applicable, add the following below this CCPL HEADER, with the fields
! enclosed by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CCPL HEADER END
!
! Copyright 2011-2012 ForgeRock AS
! Portions Copyright 2013 Jens Elkner
!
-->
<refentry xml:id="start-ds-1" xmlns="http://docbook.org/ns/docbook"
version="5.0" xml:lang="en"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="common.xml" xpointer='xpointer(//info[@name="info"])'/>
<refmeta>
<refentrytitle><application>start-ds</application></refentrytitle>
<xi:include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</refmeta>
<refnamediv>
<refname><application>start-ds</application></refname>
<refpurpose>start OpenDJ directory server</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>start-ds</command>
<arg>-F</arg>
<arg>-L</arg>
<arg>-Q</arg>
<arg>-s</arg>
<group choice="opt" >
<arg choice="plain">-N</arg>
<arg choice="plain">-t <replaceable class="parameter">seconds</replaceable></arg>
</group>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>
This utility can be used to start the directory server manually, as well as to
obtain the server version and other forms of general server information.
</para>
<para os="solaris">
However, on Solaris 10 and better the preferred method to start the server is to
enable the related SMF service (default: svc:/network/ldap/opendj@VERS@:default),
which automatically starts and monitors the related OpenDJ instance. So you can
take advantage of <citerefentry>
<refentrytitle>smf</refentrytitle><manvolnum>5</manvolnum>
</citerefentry> features and as well as getting notified, if something goes wrong.
</para>
<para os="solaris">
In turn, if you really need to start the server manually, you need to disable the
corresponding SMF service first using <citerefentry>
<refentrytitle>svcadm</refentrytitle><manvolnum>1M</manvolnum>
</citerefentry> to shutdown a the possibly running server instance first.
</para>
</refsection>
<refsection>
<title>Options</title>
<para>
The following options are supported.
</para>
<variablelist>
<varlistentry>
<term><option>-L, --useLastKnownGoodConfig</option></term>
<listitem>
<para>
Attempt to start using the configuration that was in place at the last
successful startup (if it is available) rather than using the current active
configuration.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-N, --nodetach</option></term>
<listitem>
<para>
Do not detach from the terminal and continue running in the foreground. This
option cannot be used with the -t, --timeout option.
</para>
<para os='solaris'>
Furthermore it should never be used as an argument for the
<constant>start-ds.java-args</constant> or
<constant>default.java-args</constant> of the
<filename>config/java.properties</filename> file. Otherwise this would prevent
the SMF service to [re]start the corresponding OpenDJ instance successfully.
Similar it should also not be used as an argument in the
<property>config/server_start_args</property> property of the related OpenDJ
SMF service, because this would have the same negative effect.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-Q, --quiet</option></term>
<listitem>
<para>
Use quiet mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s, --systemInfo</option></term>
<listitem>
<para>
Display general system information.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-t, --timeout</option> <replaceable
class="parameter">seconds</replaceable></term>
<listitem>
<para>
Maximum time (in seconds) to wait before the command returns (the server
continues the startup process, regardless). A value of '0' indicates an infinite
timeout, which means that the command returns only when the server startup is
completed (Default: 200). This option cannot be used with the
-N, --nodetach option.
</para>
</listitem>
</varlistentry>
</variablelist>
<refsection>
<title>General Options</title>
<variablelist>
<varlistentry>
<term><option>-F, --fullversion</option></term>
<listitem>
<para>
Display full version info.
</para>
</listitem>
</varlistentry>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-general"]/*)'/>
</variablelist>
</refsection>
</refsection>
<refsection>
<title>Examples</title>
<informalexample os="solaris">
<para>
The following command enables the service for the default OpenDJ instance and
after that, it is checked, whether the service is running (as long as there is
no other OpenDJ service configured, one can even ommit the trailing
<literal>:default</literal>):
</para>
<literallayout><prompt
>$ </prompt><command>svcadm enable opendj@VERS@:default</command>
<prompt>$ </prompt><command>svcs -l opendj@VERS@:default</command></literallayout>
<screen>
fmri svc:/network/ldap/opendj@VERS@:default
name OpenDJ LDAP directory server
enabled true
state online
next_state none
state_time Wed Apr 17 08:27:25 2013
logfile /var/svc/log/network-ldap-opendj@VERS@:default.log
restarter svc:/system/svc/restarter:default
contract_id 2237
manifest /lib/svc/manifest/network/ldap/opendj@VERS@.xml
dependency require_all/none svc:/system/filesystem/local (online)
dependency optional_all/refresh svc:/system/identity:domain (online)
dependency require_all/none svc:/network/service (online)
</screen>
</informalexample>
<informalexample os="solaris">
<para>
The following example shows the current <property>config/*</property> properties
of the default OpenDJ SMF service (note, that no server start or stop args are
set, which is the default):
</para>
<literallayout><prompt
>$ </prompt><command>svcprop -p config opendj@VERS@:default</command></literallayout>
<screen>
config/stability astring Evolving
config/datadir astring /var/share/ldap/opendj
config/server_start_args astring
config/server_stop_args astring
</screen>
</informalexample>
<informalexample>
<para>
The following command starts the server manually without displaying information
about the startup process.
</para>
<literallayout><prompt>$ </prompt><command>start-ds -Q</command></literallayout>
</informalexample>
</refsection>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="env"])'/>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="exit-0-gt0"])'/>
<refsection name='seeAlso'>
<title>See Also</title>
<para>
<citerefentry>
<refentrytitle>stop-ds</refentrytitle>
<xi:include href='common.xml' xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry>
<refentrytitle>dsjavaproperties</refentrytitle>
<xi:include href='common.xml' xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry>
<refentrytitle>opendj</refentrytitle>
<xi:include href='common.xml' xpointer='xpointer(//manvolnum[@name="v5"])'/>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry os="solaris">
<refentrytitle>svcadm</refentrytitle>
<manvolnum>1M</manvolnum>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry os="solaris">
<refentrytitle>svcs</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry os="solaris">
<refentrytitle>svcprop</refentrytitle>
<manvolnum>1</manvolnum>
</citerefentry><wordasword os="solaris">, </wordasword>
<citerefentry os="solaris">
<refentrytitle>svccfg</refentrytitle>
<manvolnum>1M</manvolnum>
</citerefentry>.
</para>
</refsection>
</refentry>