This article is derived from the RStudio Package Manager administration guide.
RStudio Package Manager organizes and centralizes R packages across your team, department, or entire organization.
Please review the necessary system requirements, account privileges, and internet access requirements prior to installing RStudio Package Manager.
- Red Hat Enterprise Linux/CentOS Linux 6.0+
- Red Hat Enterprise Linux/CentOS Linux 7.0+
- SUSE Enterprise Linux 12 SP3+
- Ubuntu 14.04
- Ubuntu 16.04
- Ubuntu 18.04
RStudio Package Manager should run on a server with a minimum of 2GB of RAM. Package sources can be lazily cached from CRAN or eagerly downloaded. RStudio Package Manager recommends 50-200GB of disk storage.
Internet Access Requirements
RStudio Package Manager acts as a “bridge” between offline servers running R and upstream package sources like CRAN. RStudio Package Manager should be installed on a server in the network with outbound access to:
See Repository Syncing for more details on what information is downloaded from the RStudio CRAN service.
RStudio Package Manager can be configured to use a HTTP proxy to access the internet, see Outbound Proxy for more details.
Additional steps are necessary if your internal servers can not access an online server through your internal network. See the appendix on running RStudio Package Manager in an air-gapped environment.
RStudio Package Manager does not run as root. By default, root privileges are required to:
- Install RStudio Package Manager
- Start and Stop RStudio Package Manager via the service daemons
- Activate the RStudio Package Manager license
RStudio Package Manager can be installed and licensed without requiring root privileges. Instructions are available in the appendix of the admin guide.
RStudio Package Manager starts and runs under an unprivileged account. It never requires root.
The installer creates a user account and group named
rstudio-pm and runs the RStudio Package Manager service under this account. If you wish to change the account under which the service runs, please see Appendix C in the admin guide.
Download and install RStudio Package Manager for your platform. These commands will install the product into
/opt/rstudio-pm. See Appendix E in the admin guide to install into a non-default location or to perform a non-root install.
# for ubuntu sudo apt-get install gdebi-core wget https://s3.amazonaws.com/rstudio-package-manager/rstudio-pm_0.7.1-8.deb sudo gdebi 0.7.1-8.deb
# for redhat and centos wget https://s3.amazonaws.com/rstudio-package-manager/rstudio-pm-0.7.1-8.x86_64.rpm sudo yum install --nogpgcheck rstudio-pm-0.7.1-8.x86_64.rpm
# for suse wget https://download-url/rstudio-pm-0.7.1-8.x86_64.rpm sudo zypper --no-gpg-checks install rstudio-pm0.7.1-8.x86_64.rpm
RStudio Package Manager settings are controlled by a configuration file located at
/etc/rstudio-pm/rstudio-pm.gcfg by default. At a minimum, complete the
Address property within the
Serversection, by specifying the URL used to access RStudio Package Manager.
; /etc/rstudio-pm/rstudio-pm.gcfg [Server] Address = http://r-packages.example.com
http://r-packages.example.com with the value appropriate to your organization.
There are many other default options you may want to configure now or at a later point, such as:
- The on-disk location where data will be stored, default:
- The database where essential metadata should be stored, default: built-in SQLite.
- Important security settings settings such as HTTPS certificates and ports, default: HTTP on port 4242.
For multi-node or highly available (HA) setups, please refer to the REQUIRED config settings listed at Section 12 in the admin guide.
Verify the status of your license using:
If you have a license key, activate the license using
/opt/rstudio-pm/license-manager activate LICENSE_KEY
LICENSE_KEY with the value of your license key. If your server is offline or you need more information, consult Section 2.5 of the admin guide.
Restart RStudio Package Manager
After changing the configuration file or license you must restart the RStudio Package Manager service. Follow the instructions for your operating system:
# for Ubuntu 16.04, Ubuntu 18.04, RHEL/CentOS 7, SUSE 12 sudo systemctl stop rstudio-pm sudo systemctl start rstudio-pm
# for Ubuntu 14.04 and REHL/CentOS 6 sudo stop rstudio-pm sudo start rstudio-pm
Visit the web UI
You should be able to visit RStudio Package Manager in a web browser. The default port is 4242, so navigate to:
https://r-packages.example.com:4242. RStudio Package Manager should present a welcome page, though no repositories are yet available.
Try out the CLI
You should be able to invoke the admin CLI by running:
/opt/rstudio-pm/bin/rspm list. If you are not able to use the CLI, ensure your user is a member of the
sudo usermod -aG rstudio-pm USER, replacing
USERwith your username. This command will add
- Close the terminal or SSH session and begin a new session.
- In the new session, run the command
groupsto enumerate the groups the current user is a member of. Confirm that
- Re-run the command:
Note, you can elect a different group to grant access to the CLI, see Section C of the admin guide.
Now that RStudio Package Manager is installed, you can complete the second part of the setup by configuring RStudio Package Manager for your desired use case. Follow the instructions in Get Started: Configuration.