2.2. Downloading the LOCKSS Installer

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

2.2.1. LOCKSS Installer Directory

The LOCKSS Installer Directory is simply the directory under which the LOCKSS Installer is stored.

In this manual, it will sometimes be represented symbolically as <LOCKSS_INSTALLER_DIR>. Many commands, such as those to configure, start and stop the LOCKSS stack, are relative to the LOCKSS Installer Directory, meaning you need to navigate to it at the console using cd before issuing the relevant command:

cd <LOCKSS_INSTALLER_DIR>

2.2.2. Default LOCKSS Installer Directory

The default LOCKSS Installer Directory is $HOME/lockss-installer relative to the lockss user, meaning /home/lockss/lockss-installer on most Linux systems.

You can specify a Custom LOCKSS Installer Directory when Running the LOCKSS Downloader by using its --download-dir option.

2.2.3. Running the LOCKSS Downloader

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

  1. Double-check that you are operating in the root session established for the entirety of this chapter [3] by typing:

    whoami
    

    and verifying that the output is root.

  2. Run this curl or wget command as the lockss user:

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

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

    Tip

    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 | runuser -u lockss sh -s -, like so:

    ... | runuser -u lockss 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 (currently 2.0.90-beta2 NOT YET RELEASED), you can do so by making references to the lockss-installer Git repository on GitHub [2]:

    • You can install a version from the tip of a given Git branch <BRA> of the lockss-installer repository by adding --git-branch=<BRA> after | runuser -u lockss sh -s - in the command above, for example ... | runuser -u lockss sh -s - --git-branch=develop. 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 by adding --git-tag=<TAG> after | runuser -u lockss sh -s - in the command above, for example ... | runuser -u lockss sh -s - --git-tag=version-2.0.91-beta2. This might be needed if you are installing a specific pre-release or 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> after | runuser -u lockss sh -s - in the command above, for example ... | runuser -u lockss sh -s - --git-commit=b32c757f995134b609d125a9cb2891ec3cab3fd9. 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.

    Pre-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. Navigate into a directory into which the LOCKSS Downloader script will be downloaded, for example:

      cd /tmp
      
    2. Run this curl or wget command [1] as the lockss user:

      curl --location --output=lockss-downloader.sh https://lockss.org/downloader
      
      wget --quiet --output-document=lockss-downloader.sh https://lockss.org/downloader
      

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

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

    4. Run this command:

      chmod +x lockss-downloader.sh
      

      to make the LOCKSS Downloader script executable.

    5. Then run this command (as lockss):

      ./lockss-downloader.sh
      

      to run the LOCKSS Downloader script (as lockss).

      You can append to ./lockss-downloader.sh the same options that can be appended to | runuser -u lockss sh -s - elsewhere in this section, for instance ./lockss-downloader --download-dir=<DIR>. See Custom LOCKSS Installer Directory or Custom version of the LOCKSS Installer above.


Footnotes