In most production deployments it is desirable to run REM as a daemon.

Remd

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 $REM_USER

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.d/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 $REM_USER

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 rhino-element-manager directory. This directory contains the REM executables and log files.

JAVA_HOME

Path to the base directory of the JDK used to run REM. Typically this will be a path like /opt/jdk11.0.4

Systemd unit file

A sample systemd service unit file is provided in init.d/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_USER environment variable and the User service option should be set to the same value.

REM_HOME

Path to the rhino-element-manager directory. This directory contains the REM executables and log files.

JAVA_HOME

Path to the base directory of the JDK used to run REM. Typically this will be a path like /opt/jdk11.0.4

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.

Previous page Next page