RServe installation¶
This guide provides instructions for system administrators to install, configure, deploy, and manage R and Rserve backend service.
Overview¶
Rserve is a lightweight R backend for code execution and integration, designed for use with other services.
Requirements¶
- R version 4.0 or newer
- Ubuntu/Linux operating system with admin access
Installation¶
- Install R:
- Install Rserve package:
Start R and install Rserve and other R packages:
sudo R
install.packages("Rserve")
install.packages("knitr")
install.packages("pander")
install.packages("dbplyr")
install.packages("RClickhouse")
q()
Deployment¶
Run the following command to start Rserve in daemon mode:
Systemd¶
Create a systemd file.
Add the following content to the rserve.service file:
[Unit]
Description=Rserve daemon
[Service]
User = bao-admin
ExecStart=/usr/bin/R CMD Rserve --no-save
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
Enable the service on startup and start the service.