3.2. Downloading the LOCKSS Installer
Note
Commands in this section are run as the lockss user [1].
The next task is to download the LOCKSS Installer.
3.2.1. LOCKSS Installer Directory
The directory into which the LOCKSS Installer is downloaded is simply known as the LOCKSS Installer Directory.
Many commands in this manual, such as those to install, configure, start and stop the LOCKSS system, are relative to the LOCKSS Installer Directory, meaning you need to navigate to it at the console before issuing the relevant command.
3.2.2. Default LOCKSS Installer Directory
The default LOCKSS Installer Directory will be ${HOME}/lockss-installer (where ${HOME} refers to the lockss user's home directory, typically /home/lockss), unless you use 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, Wget or HTTPie [2] to invoke the LOCKSS Downloader [3], whose default action is to download the LOCKSS Installer.
As the lockss user [1], run this Curl, Wget or HTTPie command [2]:
curl -sSfL https://lockss.org/downloader | sh -s -
http -qd 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
Below are some advanced tips for this section.
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:
As the
lockssuser [1], run this Curl, Wget or HTTPie command [2]:curl -Lo lockss-downloader https://lockss.org/downloader
http -qdo lockss-downloader https://lockss.org/downloader
wget -qO lockss-downloader https://lockss.org/downloader
This will download the LOCKSS Downloader script into the current directory as
lockss-downloader.Inspect the file
lockss-downloaderto your satisfaction.Run this command:
chmod +x lockss-downloader
to make the LOCKSS Downloader script executable.
Type:
./lockss-downloader
to run the LOCKSS Downloader script. You can append to
./lockss-downloaderall the same options that can be appended to| sh -s -in the normal procedure documented in this section, for instance./lockss-downloader --download-dir=DIR.
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.72-alpha7, 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 branch
BRAof thelockss-installerGit 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 tag
TAGof thelockss-installerGit repository (e.g.version-2.0.61-alpha6) 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 commit identifier
COMof thelockss-installerGit 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.
Considerations if using sudo -u
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