We recommend to use the docker version of Odysseus. See Run with Docker.
This page describes how to install Odysseus Server as a Linux service that starts at system start automatically.
...
Code Block | ||
---|---|---|
| ||
#!/bin/sh while true; do java -Xmx500M -Xms500M -Declipse.p2.mirrors=false -jar /opt/odysseus/plugins/org.eclipse.equinox.launcher_1.25.0500.v20110502v20190715-1310.jar -console -debug -data @noDefault if [ "$?" != "23" ]; then break fi done |
...
Code Block | ||
---|---|---|
| ||
#! /bin/sh ### BEGIN INIT INFO # Provides: odysseus # Required-Start: $all # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/stop Odysseus Server ### END INIT INFO USERNAME=odysseus do_start() { # TODO: prevent starting odysseus a bunch of times su $USERNAME -l -c "screen -dmS odysseus odysseus" } do_stop() { # TODO: if you have started odysseus a bunch of times without stopping it before, stopping doesn't work su $USERNAME -c "screen -p 0 -S odysseus -X quit" } case "$1" in start) echo "Starting Odysseus ..." do_start ;; stop) echo "Stopping Odysseus ..." do_stop ;; restart) echo "Restarting Odysseus ..." do_stop do_start ;; *) echo "Usage: /etc/init.d/odysseus {start|stop}" ;; esac exit 0 |
...
Code Block | ||
---|---|---|
| ||
/etc/init.rc/odysseus start /etc/init.rc/odysseus stop /etc/init.rc/odysseus restart # On most systems also: service odysseus start service odysseus stop service odysseus restart |
You can get the OSGI console by joining the screen instance:
...
To leave the OSGI console, you have to press Ctrl+A
followed by the key d
.
To deploy odysseus to a bunch of servers, you can use a deploy script.