TABLE OF CONTENTS
- Running the RLM Server as a Service on Windows
- Running the RLM Server as a Service on Linux
- Running the RLM Server as a Service on macOS
Running the RLM Server as a Service on Windows
On Microsoft Windows servers, you may want to install and run the rlm server as a Windows service process. A service process can start automatically at boot time and remain running as long as the system is up, regardless of user logins and logouts.
You can install RLM as a service either in the RLM web interface or in a command window. Once installed as a service, it remains installed until it is explicitly deleted as a service. Installing RLM as a service does not start RLM; services are started via the Windows Services control panel, and at boot time.
To install using the web interface, select Manage Windows Service from the main menu on the left. You will get a form with 3 data fields:
optional command-line arguments
All 3 fields will be filled in with default values. You can just select “Install Service”, and the “rlm” service will be installed for you. By default, the logfile is put in the directory with the rlm.exe binary, and it is named rlm.log. Also, by default, rlm will search for all license files in this directory.
If you select Remove Service, the service name specified in the form will be removed.
If the instance of rlm which you are running is actually running as a service, you will not be able to Remove the Service (since it is running). To remove the service, you will have to stop the service, and then either use the service control panel in Windows, or run rlm in a command window and use the Remove Service option in the web interface.
Optionally, you can install RLM as a service in a command window. To do this, use the rlm program itself (in a command window), with special arguments:
rlm -install_service -dlog [+]logfile [-service_name sname] <rlm runtime args>
where: logfile is the pathname for the server debug log. This parameter is required. If preceded by the ‘+’ character, the logfile will be appended, rather than created.
sname is an optional name for the installed service. If not specified, sname defaults to “rlm”. If sname contains embedded whitespace, it must be enclosed in double quotes.
<rlm runtime args> are any other command line arguments to be passed to rlm when it is started. Example:
rlm -install_service -service_name rlm-xyz -dlog c:\logs\server.log -c c:\licenses\xyz.lic
This installs rlm as a service under the name “rlm-xyz”. When started via the Services control panel or at boot time, rlm will be passed the “-c c:licensesxyz.lic” args, and it will write it’s debuglog information to the file c:logsserver.log
Installed RLM services are also deleted with the rlm program. Services must be stopped via the service control panel before they can be deleted. Note that deleting a service deletes it from the Windows service database; it does not delete the rlm executable or associated license file(s):
rlm -delete_service [-service_name sname]
where: sname is an optional name for the installed service. If not specified, service_name defaults to “rlm”. If service_name contains embedded whitespace, it must be enclosed in double quotes.
Running the RLM Server as a Service on Linux
On most Unix systems, system services are started at boot time, usually via startup scripts located in /etc/rc.<something>. For example, the script could be located in /etc/init.d/rlm, with a link to /etc/rc5.d/S98rlm. Note that you must install this startup script as root.
The startup script should run as specific system level user so that the rlm servers are not running as root.
Running the RLM Server as a Service on macOS
On Mac systems, the server can be started by placing a script in /Library/LaunchDaemons.
The following is an example of a script which would start rlm at boot time on Mac systems. Note that this script must be placed in the /Library/LaunchDaemons directory, and it must have an extension of .plist.
You should change ABSOLUTE_PATH_TO_RLM to the path to the rlm server binary. You can add additional ProgramArguments as needed:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.peregrinel.rlm</string> <key>ProgramArguments</key> <array> <string>ABSOLUTE_PATH_TO_RLM</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>