3.2. Downloading the LOCKSS Installer

Section Summary

This section describes how to download the LOCKSS Installer with the LOCKSS Downloader.

Note

Commands in this section are run as the lockss user [1].

3.2.1. LOCKSS Installer Directory

The LOCKSS Installer Directory is the directory into which the LOCKSS Installer is downloaded and stored. Many commands in this manual, such as those to configure, start and stop the LOCKSS system, are relative to the LOCKSS Installer Directory, meaning you need to navigate to it at the console using cd before issuing the relevant command.

3.2.2. Default LOCKSS Installer Directory

The default LOCKSS Installer Directory is ${HOME}/lockss-installer (meaning /home/lockss/lockss-installer on most Linux systems).

You can override this default by using the LOCKSS Downloader's --download-dir option to set a Custom LOCKSS Installer Directory.

3.2.3. Running the LOCKSS Downloader

To download the LOCKSS Installer, you will use Curl or Wget [2] to invoke the LOCKSS Downloader [3], whose default action is to download the LOCKSS Installer.

As the lockss user [1], run this Curl or Wget command [2]:

curl -sSfL https://lockss.org/downloader | sh -s -
wget -qO- https://lockss.org/downloader | sh -s -

This will download the LOCKSS Installer into the Default LOCKSS Installer Directory.

Tip

Inspecting the LOCKSS Downloader before running it

For security purposes, you may wish to inspect the LOCKSS Downloader before executing it.

One option is to review the contents of the script directly on GitHub to your satisfaction, then execute it as described above. The URL https://lockss.org/downloader redirects to https://github.com/lockss/lockss-downloader/raw/main/lockss-downloader.

Another option is to download a copy of the LOCKSS Downloader script, review it, then execute it, all locally. To do so, follow this procedure:

  1. As the lockss user [1], run this Curl or Wget command [2]:

    curl -Lo lockss-downloader.sh https://lockss.org/downloader
    
    wget -qO lockss-downloader.sh https://lockss.org/downloader
    

    This will download the LOCKSS Downloader script into the current directory as lockss-downloader.sh.

  2. Inspect the file lockss-downloader.sh to your satisfaction.

  3. Run this command:

    chmod +x lockss-downloader.sh
    

    to make the LOCKSS Downloader script executable.

  4. Type:

    ./lockss-downloader.sh
    

    to run the LOCKSS Downloader script.

    You can append to ./lockss-downloader.sh all the same options that can be appended to the | sh -s - part of the Curl or Wget commands documented in this section, for instance ./lockss-downloader --download-dir=DIR; see Custom LOCKSS Installer Directory or Custom LOCKSS Installer Directory below.

Custom LOCKSS Installer Directory

If you need your LOCKSS Installer Directory to be a directory DIR other than the Default LOCKSS Installer Directory, add --download-dir=DIR (or -d DIR) after | sh -s -, like so:

... | sh -s - --download-dir=DIR
Custom version of the LOCKSS Installer

If you have a reason to install a version of the LOCKSS Installer other than the latest stable release 2.0.84-beta1, you can do so by making references to the lockss-installer Git repository on GitHub [4]:

  • You can install a version from the tip of a given Git branch BRA of the lockss-installer repository (e.g. develop) by adding --git-branch=BRA (or -b BRA) after | sh -s -. This might be needed if you are helping the LOCKSS Team test a development, pre-release, or hotfix version of the LOCKSS Installer.

  • You can install a version labeled by a given Git tag TAG of the lockss-installer repository (e.g. version-2.0.72-alpha7) by adding --git-tag=TAG (or -t TAG) after | sh -s -. This might be needed if you are installing a specific past version of the LOCKSS Installer.

  • You can install a version as of a specific Git commit COM of the lockss-installer repository by adding --git-commit=COM (or -c COM) after | sh -s -. This might be needed if you are helping the LOCKSS Team test a development version of the LOCKSS Installer from a specific point in time in its Git history.

Considerations if using sudo -u lockss

If you must use:

... | sudo -u lockss sh -s -

to invoke the LOCKSS Downloader as the lockss user, beware that typically it will run in a context where ${HOME} has been adjusted to the home directory of the lockss user, but this is not guaranteed -- it depends on the way sudo is configured on your host system. To ensure ${HOME} is set correctly, use the -H (--set-home) option of sudo, for example like so:

... | sudo -Hu lockss sh -s -

Footnotes