In most production deployments it is desirable to run REM as a daemon.
remd.sh script
The remd.sh script starts the Rhino Element Manager as a background service and provides basic control actions.
This script does not provide control of REM instances started with the rem.sh script, even if they share the same $REM_HOME.
Usage: ./remd.sh {start|stop|restart|check}
| Command | Action |
|---|---|
start |
Start REM as the |
stop |
Stop the REM server process |
restart |
Restart the REM server |
check |
Check the REM process is running |
Init script
A sample init script is provided in init/rhino-element-manager, offering similar functionality to remd.sh for operating systems using a SystemV type init system.
This script is written for LSB compliant Linux systems and must be modified for other systems.
| Command | Action |
|---|---|
start |
Start REM as the |
stop |
Stop the REM server process |
restart |
Restart the REM server |
status |
Check the REM process is running |
Configuration of the init script may be provided in the system environment or by editing the values at the top of the file.
Variable |
Value |
REM_USER |
Username of the user to run the REM server as. |
REM_HOME |
Path to the |
JAVA_HOME |
Path to the base directory of the JDK used to run REM. Typically this will be a path like |
JETTY_HOME |
Path to the Jetty 12.1.x installation directory. Typically this will be a path like |
Systemd unit file
A sample systemd service unit file is provided in init/rem.service for RedHat Enterprise Linux and similar operating systems using a systemd init system.
To use the systemd service on system start, first edit the unit file to set the following variables:
Variable |
Value |
REM_USER User |
Username of the user to run the REM server as.
Both the |
REM_HOME |
Path to the |
JAVA_HOME |
Path to the base directory of the JDK used to run REM. Typically this will be a path like |
JETTY_HOME |
Path to the Jetty 12.1.x installation directory. Typically this will be a path like |
Once configured correctly, the unit file can be copied to /etc/systemd/system.
The REM service can be manually started using systemctl start rem and stopped using systemctl stop rem,
or enabled for automatic start on system reboot using systemctl enable rem.
Logging configuration
When running REM using the provided Jetty scripts, logging is configured by log4j2.properties in the REM home directory.
By default, this file configures logging to both stdout and a rolling file appender (rem.log in the REM home directory).
When running under systemd, you may prefer to log to stdout only (captured by the journal) or to the rolling file only.
To change this, comment out the appropriate appenderRef lines at the bottom of log4j2.properties.
