Installing and configuring Hashicorp Vault can be done from the terminal in a few commands. The following commands are based on the Hashicorp Vault Linux installation documentation:
curl -fsSL https://apt.releases.hashicorp.com/gpg| sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com$(lsb_release -cs) main" sudo apt-get update && sudo apt-get install vault
This installs the application, the "vault" command line interface should be available after the installation. Next, start the Vault application:
vault server -dev
In this article, "dev" mode is used. This will display the seal key and root token. Save these values, they will be used later:
Unseal Key: We[...]dXAI=
Root Token: s.C[...]b2Ja
In this article, the installation of Vault will be done on the same machine running Artifactory.
If the installation is done on another host, then you need to set the following URL to match the remote address. To get access to the Vault administration APIs, set a VAULT_TOKEN environment variable to the Root Token value printed earlier:
export VAULT_ADDR='http://127.0.0.1:8200' export VAULT_TOKEN="s.2WVfqFkeTLt3XBivcWuyX7lA"