2.1. To Start and Stop OpenIDM

By default you start and stop OpenIDM in interactive mode.

To start OpenIDM interactively, open a terminal or command window, change to the openidm directory, and run the startup script:

  • startup.sh (UNIX)

  • startup.bat (Windows)

The startup script starts OpenIDM, and opens an OSGi console with a -> prompt where you can issue console commands.

To stop OpenIDM interactively in the OSGi console, enter the shutdown command.

-> shutdown

You can also start OpenIDM as a background process on UNIX, Linux, and Mac OS X. Follow these steps before starting OpenIDM for the first time.

  1. If you have already started OpenIDM, then shut down OpenIDM and remove the Felix cache files under openidm/felix-cache/.

    -> shutdown
    ...
    $ rm -rf felix-cache/*
  2. Disable ConsoleHandler logging before starting OpenIDM by editing openidm/conf/logging.properties to set java.util.logging.ConsoleHandler.level = OFF, and to comment out other references to ConsoleHandler, as shown in the following excerpt.

    # ConsoleHandler: A simple handler for writing formatted records to System.err
    #handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
    handlers=java.util.logging.FileHandler
    ...
    # --- ConsoleHandler ---
    # Default: java.util.logging.ConsoleHandler.level = INFO
    java.util.logging.ConsoleHandler.level = OFF
    #java.util.logging.ConsoleHandler.formatter = ...
    #java.util.logging.ConsoleHandler.filter=...
  3. Remove the text-based OSGi console bundle, bundle/org.apache.felix.shell.tui-version.jar.

  4. Start OpenIDM in the background.

    $ ./startup.sh &
    

    Alternatively, use the nohup command to keep OpenIDM running after you log out.

    $ nohup ./startup.sh &
    [2] 394
    $ appending output to nohup.out
    $

To stop OpenIDM running as a background process, use the shutdown.sh script.

$ ./shutdown.sh
./shutdown.sh
Stopping OpenIDM (454)