Installation (Linux)
This guide shows how to install RPGM Server on a Linux operating system.
Distributions
RPGM Server has been tested on several Debian (stretch and later version) and Ubuntu (18.04 and later) versions.
Automatic installation
Depending on your Linux distribution and version, we may provide you an all-in-one, one-command script to execute that will install all dependencies and RPGM Server. You will have nothing to do after the execution of the script.
Installing R
R should be installed. Please refer to R installation guide corresponding to your distribution. Also some R packages need special dependencies from the operating system, like the curl library.
Installating RPGM Server
The recommended location to install RPGM Server is in /opt
.
The admin-create
tool will ask for a name, an email and a password for creating the first admin user of RPGM Server. The config-wizard
will ask for the server port and the server URL.
Note
You can also modify the configuration manually by editing the config.yml
file with a command like nano config.yml
.
Change the settings in this file according to the config.yml file.
Creating a user for the service
It is recommanded to create a user that will be used only for running RPGM Server. Do not forget to give it read and write rights to the rpgm server folder.
Running the Server
With Systemd (recommanded)
If your distribution have systemd installed, you can create a script in /etc/systemd/system/rpgmserver.service
with this content:
[Unit]
Description=RPGM Server
After=network.target
[Service]
WorkingDirectory=/opt/rpgm
User=rpgmserver
Group=rpgmserver
Restart=no
ExecStart=/opt/rpgm/rpgm-server server
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
Make sure to adapt the WorkingDirectory folder with the folder containing your RPGM Server installation, and User and Group with the user the service will run as.
You can then start, restart and stop the service with:
# # Will make RPGM Server starts on startup
# systemctl enable rpgmserver
# # Will start RPGM Server
# systemctl start rpgmserver
# # Will stop RPGM Server
# systemctl stop rpgmserver
With screen (deprecated)
RPGM can be run in screen
:
You can detach from screen with Ctrl+A then D, and RPGM Server will keep running in background. The server is then executed in a linux screen environment. You can stop RPGM Server console with screen -r rpgmserver
and then Ctrl+C.
Installing Packages
On Linux, the CRAN does not provide already compiled packages when using install.packages()
. Thus, all packages need to be recompiled, which can be a long task. Some R packages depends on tens of others packages that also need to be compiled. Because of this, we recommended that you manually install from an SSH session in R the most common R packages you will use.
Warning
Some R packages also need some system dependencies, and their compilations can failed without them.