Use one of the following techniques.
-
Use the start-ds command.
$ opendj/bin/start-ds
Alternatively, you can specify the --no-detach option to start the server in the foreground.
-
(UNIX) Create an RC script, and then use the script to start the server.
Unless you run OpenDJ as root, use the --userName
userNameoption to specify the user who installed OpenDJ.$ sudo opendj/bin/create-rc-script --outputFile /etc/init.d/opendj --userName mark $ sudo /etc/init.d/opendj start
For example, on Linux if you run OpenDJ as root, you can use the RC script to start the server at system boot, and stop the server at system shutdown.
$ sudo update-rc.d opendj defaults update-rc.d: warning: /etc/init.d/opendj missing LSB information update-rc.d: see <http://wiki.debian.org/LSBInitScripts> Adding system startup for /etc/init.d/opendj ... /etc/rc0.d/K20opendj -> ../init.d/opendj /etc/rc1.d/K20opendj -> ../init.d/opendj /etc/rc6.d/K20opendj -> ../init.d/opendj /etc/rc2.d/S20opendj -> ../init.d/opendj /etc/rc3.d/S20opendj -> ../init.d/opendj /etc/rc4.d/S20opendj -> ../init.d/opendj /etc/rc5.d/S20opendj -> ../init.d/opendj
-
(Windows) Register OpenDJ as a Windows Service, and then manage the service through Windows administration tools.
C:\Users\Mark> opendj\bat\windows-service.bat --enableService
By default OpenDJ saves a compressed version of the server
configuration used on successful startup. This ensures that the server
provides a "last known good" configuration, which can be used as a reference
or copied into the active configuration if the server fails to start with the
current active configuration. It is possible, though not usually recommended,
to turn this behavior off by changing the global server setting
save-config-on-successful-startup to
false.

