Skip to content

Manual Installation for Minimal Root Use#

Discussion#

The Package Manager installer requires root privileges and installs the Package Manager to /opt/rstudio-pm. Additionally, it configures services for systemd, adds log files to /var/log, adds a configuration file under /etc/rstudio-pm, creates an rstudio-pm user account and group, and installs a logrotate configuration.

It is possible to extract the Package Manager files manually and configure the service to use configuration and data files at a custom location. Most of these steps can be performed without root privileges.

Warning

Unfortunately, given the ad-hoc nature of these install instructions, this path is not recommended, and Posit can only offer minimal support for customers who run into issues. Do not use the instructions below to perform upgrades, as these need to be performed manually and crafted specifically for the environment.

Extracting Files#

First, download the latest version of Package Manager from the link provided by Posit. Then, extract the files from the installer by following the instructions for your operating system, below.

Ubuntu binutils

If you are using Ubuntu, then you may need to install binutils with sudo apt install binutils to use the ar utility.

Terminal
$ mkdir rspm
$ ar x rstudio-pm_2024.08.0-6_amd64.deb
$ tar -xzvf data.tar.gz -C rspm/
$ cd rspm
Terminal
$ mkdir rspm
$ cd rspm
$ rpm2cpio ../rstudio-pm-2024.08.0-6.x86_64.rpm | cpio -div

Create Directories#

Create the directories you need to run Package Manager.

Terminal
$ mkdir log
$ touch log/rstudio-pm.log
$ touch log/rstudio-pm.access.log
$ mkdir run
$ mkdir data
$ mkdir temp

Licensing#

The license manager used by Package Manager supports userspace license activation. If you wish to activate a system-wide license, root privileges are required. See the Licensing section for more details on system-wide licensing.

Terminal
# Initialize a trial in userspace
$ ./opt/rstudio-pm/bin/license-manager initialize --userspace

# Activate a userspace license key, if you have a license key
$ ./opt/rstudio-pm/bin/license-manager activate --userspace <key>

Edit config file#

Next, edit the Package Manager configuration file to point to the directories and access log you created. Add the following lines to the [Server] and [Logging] configuration sections.

./etc/rstudio-pm/rstudio-pm.gcfg
[Server]
DataDir = <path-to-unbundled-rspm-dir>/data
SockFileDir = <path-to-unbundled-rspm-dir>/run
AccessLog = <path-to-unbundled-rspm-dir>/log/rstudio-pm.access.log
TempDir = <path-to-unbundled-rspm-dir>/temp

[Logging]
SystemLog = <path-to-unbundled-rspm-dir>/log/rstudio-pm.log

Start the Package Manager Service#

When Package Manager is installed without root, the system daemons are not used to automatically start Package Manager. Instead, the user is required to start Package Manager manually and ensure the process continues to run. The command to start Package Manager is:

Terminal
$ ./opt/rstudio-pm/bin/rstudio-pm --config \
    ./etc/rstudio-pm/rstudio-pm.gcfg

As an example, nohup can be used to launch this command without blocking or depending on the terminal using:

Terminal
$ nohup ./opt/rstudio-pm/bin/rstudio-pm --config \
    ./etc/rstudio-pm/rstudio-pm.gcfg &

Use the CLI to Manage Package Manager#

Terminal
$ ./opt/rstudio-pm/bin/rspm --config ./etc/rstudio-pm/rstudio-pm.gcfg help

In this mode, every CLI command will require the config flag that points at the configuration file.