This guide contains information on managing an Orion server.

# Operating the server

## Starting the server

The server is started by simply invoking the "orion" executable (orion.exe on Windows, "orion" on Unix platforms). Starting the OSGI console by passing the "-console" argument is also recommended:

    % orion -console

## Stopping the server

To stop the server, go to the OSGi console and type "close". You can also simply kill the server process, but an orderly shutdown is always recommended to ensure all data is correctly persisted.

## Running disconnected from a shell on Unix

On a headless Linux server it is desirable to not have to keep a shell running with OSGI console. You can start an Orion server using the nohup command in this case.

    % nohup orion -console 4444 > orion.log &
    nohup: ignoring input and redirecting stderr to stdout

We have specified the log file orion.log that will capture the console output. You may look at the log to see that the server started and there are no errors.

We have also set the console to listen to port 4444. You can telnet to port 4444 to issue the close command to stop the server.

    % telnet localhost 4444
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    osgi> close
    Really want to stop Equinox? (y/n; default=y)  y
    osgi> Connection closed by foreign host.