Installation Overview

By the end of this lesson, you will be able to:

  • Explain why Package Manager is typically one of the first Posit products an administrator configures
  • Describe what Package Manager provides for security, reproducibility, and package distribution
  • Identify the components required for a minimal Package Manager installation

Introduction

In the first chapter, you learned what Package Manager is and how data science teams rely on it. Before diving into the hands-on installation lab, this lesson provides a high-level overview of what you will install and why it matters to the teams you support.

In a complete Posit Team deployment, Package Manager is typically one of the first Posit products an administrator installs, because both Workbench and Connect can then depend on Package Manager as their package repository. Before you run a single command, this overview revisits why Package Manager matters to the teams you support and then breaks down the distinct pieces you will assemble in the lab: a language runtime to build packages, Package Manager itself, license activation, and the first CRAN and PyPI repositories.

NoteTimings for this chapter
  • Reading time: 15 minutes
  • Documentation reading time: 20 minutes
  • Hands-on exercise time: 15 minutes
TipWhy is it relevant to me?

As a system administrator, Package Manager is often the first thing you will configure after installing Workbench and Connect. This is because Package Manager provides critical functionality that benefits both the users of your Posit products and your internal security and operations teams.

  • Security and compliance: Your security team will ask which packages are in use and whether any have known vulnerabilities. Package Manager surfaces CVE data from the Open Source Vulnerabilities (OSV) database and lets you enforce block rules by vulnerability severity, license type, or package name, even before a package ever reaches a user’s session.
  • Reproducibility and change control: Code that runs today must run in six months. Package Manager provides time-stamped repository snapshots that integrate with renv, giving teams a stable repository without forcing everyone to use older versions of the packages.
  • Faster installs on Linux: CRAN does not ship pre-built binaries for Linux. Without Package Manager, installing packages on Linux (and this includes Workbench and Connect) means compiling from source, which can take dozens of minutes or even hours. Package Manager provides pre-built Linux binaries, dramatically reducing installation time.
  • Internal package distribution: When your data science teams develop shared internal packages, Package Manager gives you a supported, governed way to distribute them, with automatic version archiving and Git-backed build pipelines.
  • Firewall and air-gapped environments: In highly regulated industries, production data science servers cannot reach CRAN or PyPI directly. Package Manager acts as an internal proxy, meaning your users get seamless package access without ever needing internet connectivity from the server.

What You Will Install

A minimal Package Manager installation has a few distinct pieces, and it helps to understand each before you begin.

  • A language runtime to build packages. Package Manager needs R installed in order to build R packages (for example, internal packages from Git, which you will do in a later lab). The same applies to Python for Python packages.
  • Posit Package Manager. Posit distributes Package Manager through Linux repositories for common distributions, so installing it looks much like installing any other system package.
  • A license. Package Manager is a licensed product and must be activated before using it. You will use license file activation in this course, which is the recommended approach.
  • Repositories. A fresh installation has no repositories defined. You make packages available by creating repositories (such as CRAN and PyPI) and subscribing them to the corresponding sources.

Files and Locations You Should Know

Throughout the labs you will edit configuration, inspect logs, and run the command-line tools. It helps to know up front where Package Manager places things on a Linux system. By default, Package Manager runs as the unprivileged rstudio-pm user, and most administrative commands require sudo.

Package Manager is managed by systemd, just like any other Linux service. The installation package registers a standard rstudio-pm service unit, so you start, stop, restart, and check the status of Package Manager with the same systemctl commands you already use for the rest of your system (for example, sudo systemctl restart rstudio-pm). Process supervision, automatic restarts, and journal integration all work exactly as you would expect. Package Manager fits cleanly into your existing operational practices.

What Path Notes
Configuration file /etc/rstudio-pm/rstudio-pm.gcfg The main config file, in gcfg (INI-like) format. Edit it with sudo, then restart the service for changes to take effect.
Default values reference /etc/rstudio-pm/rstudio-pm.gcfg.defaults A read-only example showing the default value of every setting. Do not edit it; copy settings into rstudio-pm.gcfg instead.
Service binary /opt/rstudio-pm/bin/rstudio-pm The Package Manager service itself.
Admin CLI /opt/rstudio-pm/bin/rspm The rspm command-line tool you will use to create repositories, add sources, manage tokens, blocklist rules, and more.
License manager /opt/rstudio-pm/bin/license-manager Used to check license status and manage activation.
Installed version /opt/rstudio-pm/VERSION A plain text file with the installed version (you can also run rspm --version).
Application data /var/lib/rstudio-pm/ The data directory (Server.DataDir): the internal database (SQLite by default, under db/), cached source and binary packages, and the license file. This is the directory to back up.
Logs /var/log/rstudio/rstudio-pm/rstudio-pm.log The main server log. Optional access, service, and audit logs (rstudio-pm.access.log, rstudio-pm.service.log, rstudio-pm.audit.log) live in the same directory when enabled.

For the full list of configuration settings, see the Configuration appendix, and for log details see the Logging section of the Admin Guide.