Download, Install and Configure the Vault Package

  1. Log in as root, unzip the binary file, and extract it to /usr/local/bin.

# cd /tmp
# unzip vault_1.19.3+ent.hsm_linux_amd64.zip -d
# mv vault /usr/local/bin
  1. Set vault permissions.

# chmod 755 /usr/local/bin/vault
# setcap cap_ipc_lock=+ep /usr/local/bin/vault
  1. Add Vault to the system PATH by creating a shell script under /etc/profile.d.
    This step ensures that all users, including service users like vault can run the vault command without needing to type the full path.

# echo 'export PATH=$PATH:/usr/local/bin' > /etc/profile.d/vault.sh
# chmod +x /etc/profile.d/vault.sh
# source /etc/profile.d/vault.sh
  1. Create the Vault data directories.

# mkdir --parents /opt/vault/data 
# mkdir --parents /opt/vault/logs
  1. Confirm that the binary file is available.

# vault version 
# vault

You should see your Vault version and a list of Vault commands.