Installing HashiCorp Vault
HashiCorp Vault is a powerful tool for managing secrets, encryption as a service, and privileged access maangement. Vault can be installed by using a pre-compiled binary or by compiling from source code.
In this Lab Step, you will install using a pre-compiled binary for 64-bit Linux systems, and enable command completions for an improved command-line experience.
1. Download the pre-compiled binary Zip file:
Copy codewget https://releases.hashicorp.com/vault/0.10.3/vault_0.10.3_linux_amd64.zip -O /tmp/vault.zip
Version 0.10.3 is installed to ensure a consistent experience in the Lab even as newer versions are released.
2. Unzip the vault binary to a directory in your
Copy codesudo unzip /tmp/vault.zip -d /usr/local/bin/
/usr/local/bin directory is part of your
PATH variable, so you can now use
vault from any directory.
3. Enter the following to confirm that Vault has been installed:
4. Install Vault command completions:
Copy codevault -autocomplete-install
This command adds a command to your shell configuration file so that completions are enabled every time you log in. However, you need to run the added command in your current shell to enable completions for it.
5. Run the command added to your shell configuration file:
Copy codesource ~/.bashrc
6. Type vault followed by a space, and press tab twice to see available command completions:
Now, you can always press tab twice to see available completions or autocomplete a command if there is only one completion at any point of entering a Vault command.
In this Lab Step, you installed HashiCorp Vault using a pre-compiled binary and enabled Vault command completions.