Installation¶
This chapter provides the minimum amount of steps required to install the RStudio Package Manager (RSPM).
If needed, additional information regarding each step is available in subsequent chapters. Although this guide provides the steps necessary to install RSPM, your environment may require one or more additional steps.
RStudio Support¶
RStudio is happy to provide support for anyone using our product. However, we do not provide support for:
- Installation
- Professional services
We don't provide support for these items because our top priority is to focus on building the best products for our users. We understand that you may require additional assistance. If you require such assistance, then please refer to our certified partners.
RStudio's support is limited to our professional products. If your question is related to R, R code, or specific R packages, then visit the RStudio Community.
If your question is related to RSPM, then open a support ticket by doing one of the following:
Note: If you have not been able to download the software, then skip to Step 2.
- Run the command:
/opt/rstudio-pm/bin/run-diagnostics
- If you unpacked the software in a non-default location, then navigate to the directory and run
./bin/run-diagnostics
- If the cause of the problem is not evident to you, then send RStudio an email to support@rstudio.com including:
- Your name and company
- Your goal
- What you have tried (please be as detailed as possible)
- The current error (screenshots are helpful)
- The diagnostics output from Step 1
Note: RStudio's goal is to assist you in the most efficient way possible. The more information that you provide in the email will help ensure that we support you in the best and most efficient way possible.
For additional information, see RStudio's Support Agreement.
Prerequisites¶
Before installing RSPM, review the necessary system requirements, account privileges, and internet access requirements.
System Requirements¶
- Red Hat Enterprise Linux/CentOS Linux 6.0+
- Red Hat Enterprise Linux/CentOS Linux 7.0+
- Red Hat Enterprise Linux/CentOS Linux 8.0+
- SUSE Enterprise Linux 12 SP3+
- SUSE Enterprise Linux 15
- openSUSE Leap 42.3
- openSUSE Leap 15.0
- Ubuntu 16.04
- Ubuntu 18.04
Additional Information¶
It is recommended that you run RSPM on a server with a minimum of:
- 2 GB of RAM
- 100+ GB of disk storage
Internet Access Requirements¶
RSPM acts as a "bridge" between offline servers running R and upstream package sources, such as CRAN. RSPM should be installed on a server in the network with outbound access to:
For additional details on the information that is downloaded from the RStudio CRAN service, see the CRAN Source section.
RSPM can be configured to use an HTTP proxy to access the internet. For more information, see the Outbound Proxy section.
If your internal servers do not have access to an online service through your internal network, then additional steps are required. For running RSPM in an air-gapped environment, refer to the Appendix - Air-Gapped RStudio Package Manager.
Air-Gapped System Requirements¶
The amount of storage that is required to run RSPM on an offline environment varies based on several things.
For example:
- If you're running RSPM in an offline environment and your unique configuration, then the amount of storage required increases. 100+ GB of storage should be sufficient for the most basic setups.
- If R package binaries are enabled, then the amount of storage depends on the number of R versions and Linux distributions supported. For more information about R package binaries, see the Serving Package Binaries section.
- For each R version and Linux distribution, RSPM requires an additional 100 GB of storage space.
Root Requirements¶
By default, RSPM does not run as root. For more information, see the RunAs User section.
By default, root privileges are required to:
- Install RSPM
- Start and Stop RSPM via the service daemons
- Activate RSPM license
RSPM can be installed and licensed without requiring root privileges. Instructions are available in the Appendix - Manual Installation for Minimal Root Use.
RunAs User¶
The RSPM service does not run as root by default. Instead, RSPM starts and runs under an unprivileged account.
The installer creates a user account and group named rstudio-pm
and it runs
RSPM service under this account.
If you wish to change the account under which the service runs, then refer to the Appendix - Changing RunAs User.
There are two exceptions to the installer creating and running under the default user account:
- If the user already exists, then it isn't created.
- If the initial system was configured for RSPM to run as a different user account, then the installer attempts to detect the user account. If it exists, then RSPM attempts to use the configured user account instead of the default
rstudio-pm
account.
R Installation¶
The Git sources functionality allows RSPM to automatically expose R packages that are tracked in Git.
If you plan on using Git sources, then RSPM requires:
- A valid installation of R version 3.0.0 or greater
- A configured R installation
Therefore, to utilize Git sources, you must:
- Install R
- Update and configure the R installation
Additionally, Git sources require a configured R installation.
For more information about Git sources, see the Git Sources section.
For more information about building R packages, see the Building R Packages section.
Installation¶
Download and Install RSPM¶
This section is for downloading and installing RSPM for your platform.
These
commands will install the product into /opt/rstudio-pm
.
See the Appendix - Manual Installation for Minimal Root Use to install into a non-default location or to perform a non-root install.
Run the commands for the operating system that you require:
# For Ubuntu
sudo apt-get install gdebi-core
wget https://s3.amazonaws.com/rstudio-package-manager/ubuntu/amd64/rstudio-pm_1.1.4.1-5_amd64.deb
sudo gdebi rstudio-pm_1.1.4.1-5_amd64.deb
# For RedHat 6/7 and CentOS 6/7
wget https://s3.amazonaws.com/rstudio-package-manager/centos/x86_64/rstudio-pm-1.1.4.1-5.x86_64.rpm
sudo yum install rstudio-pm-1.1.4.1-5.x86_64.rpm
# For RedHat 8 and CentOS 8
wget https://s3.amazonaws.com/rstudio-package-manager/centos8/x86_64/rstudio-pm-1.1.4.1-5.x86_64.rpm
sudo yum install rstudio-pm-1.1.4.1-5.x86_64.rpm
# For openSUSE 42.3 and SLES 12
wget https://s3.amazonaws.com/rstudio-package-manager/opensuse/x86_64/rstudio-pm-1.1.4.1-5.x86_64.rpm
sudo zypper install rstudio-pm-1.1.4.1-5.x86_64.rpm
# For openSUSE and SLES 15
wget https://s3.amazonaws.com/rstudio-package-manager/opensuse15/x86_64/rstudio-pm-1.1.4.1-5.x86_64.rpm
sudo zypper install rstudio-pm-1.1.4.1-5.x86_64.rpm
Package Validation¶
The RSPM installer is signed with a key belonging to RStudio.
If you wish to verify this signature, then do one of the following:
- Obtain the public key from our website and save it into a file (e.g.
rstudio-code-signing.key
). For more information, see the RStudio Signed Builds page. - Obtain the key from a GnuPG keyserver using the following commands:
# For Ubuntu
gpg --keyserver keys.gnupg.net --recv-keys 3F32EE77E331692F
# For RHEL, CentOS, openSUSE, and SLES gpg --keyserver keys.gnupg.net --recv-keys 3F32EE77E331692F gpg --armor --export 3F32EE77E331692F > rstudio-code-signing.key # Import the key into the set of keys RPM uses to validate package signatures rpm --import rstudio-code-signing.key
After obtaining the GnuPG key, validate the RSPM installer executing the following commands:
# Validate Ubuntu installer dpkg-sig --verify rstudio-pm_1.1.4.1-5_amd64.deb # Validate RHEL, CentOS, openSUSE, or SLES installer rpm -K rstudio-pm-1.1.4.1-5.x86_64.rpm
Initial Configuration¶
An example configuration file that includes all the available configuration settings along with their defaults is installed at
/etc/rstudio-pm/rstudio-pm.gcfg.defaults
.
By default, the RSPM settings are controlled by a configuration file located
at /etc/rstudio-pm/rstudio-pm.gcfg
. At a minimum, complete the
Address
property within the Server
section.
Do this by specifying the URL used to access RSPM:
; /etc/rstudio-pm/rstudio-pm.gcfg [Server] Address = http://r-packages.example.com
Replace http://r-packages.example.com
with the value appropriate for your
organization.
There are many other default options that you may want to configure now or at a later point, such as:
- The on-disk location where data will be stored, default:
/var/lib/rstudio-pm
- The database where essential metadata should be stored, default: built-in SQLite.
- Important security settings settings such as HTTPS certificates and ports; the default is HTTP on port 4242.
For information about multi-node or highly availability (HA) setup, refer to the High Availability and Load Balancing. This section contains the settings that are required.
Licensing¶
To verify the status of your license:
/opt/rstudio-pm/bin/license-manager status
If you have a license key, then activate the license:
Note: Replace
LICENSE_KEY
with the value of your license key. If your server is offline or you need more information, then refer to the Licensing chapter.
/opt/rstudio-pm/bin/license-manager activate LICENSE_KEY
Restart RStudio Package Manager¶
After updating the configuration file settings, it is required that you restart the RSPM service.
To restart the RSPM service, follow the instructions for your operating system:
# For Ubuntu 16.04, Ubuntu 18.04, RHEL/CentOS 7-8, openSUSE/SLES
sudo systemctl stop rstudio-pm
sudo systemctl start rstudio-pm
# For REHL/CentOS 6
sudo stop rstudio-pm
sudo start rstudio-pm
RSPM supports the HUP
signal when:
- You are making licensing changes.
- Activating a new license.
Note: Some configuration properties are also marked as "reloadable".
For more information about sending a HUP
signal to your RSPM, see the Stopping and Starting section.
Note the following:
- A
HUP
signal only reloads configuration settings that have explicitly changed.- Commenting out a setting will not affect the configuration when using the
HUP
signal.
If you have commented out a setting instead of changing the setting value, then do not reload the RSPM service using the HUP
signal. Instead, restart RSPM.
View the RStudio Package Manager Web User Interface¶
As a user, you can view RSPM in a web browser. Viewing RSPM in a web browser provides a user-friendly interface for viewing information about packages, package READMEs, metrics, etc.
Note: For administrative changes, use the command-line client.
To view RSPM in a web browser:
- Open a web browser.
- Navigate to RSPM by following
https://r-packages.example.com:<port>
Note: The default port is 4242, so the path should be
https://r-packages.example.com:4242
. - Once you navigate to the link, the RSPM Welcome page displays.
Note: At this point, repositories aren't available.
The Admin Command-line Interface¶
RSPM is administered through a command-line interface (CLI) which administrators can use to create:
- Create repositories and sources
- Setup sync schedules for CRAN sources
To invoke the Admin CLI, run:
/opt/rstudio-pm/bin/rspm list
If you aren't able to access the Admin CLI, then verify that your user is a member of the rstudio-pm
group by doing the following:
- Run:
sudo usermod -aG rstudio-pm <USER>
(replace<USER>
with your username). This command addsUSER
to therstudio-pm
group. - Close the terminal or SSH session.
- Start a new session and run the
groups
command. This enumerates the groups that the current user is a member of. - Confirm that
rstudio-pm
is listed. - Re-run the command:
/opt/rstudio-pm/bin/rspm list
.
Note: You can select a different group to grant access to the Admin CLI. For more information, see the Appendix - Changing RunAs User chapter.
Next Steps¶
Now that you've successfully installed RSPM, you may now configure RSPM for your desired use case(s).
Configuration instructions are provided in the Getting Started: Configuration chapter.