wget https://releases.hashicorp.com/vault/0.8.3/vault_0.8.3_linux_amd64.zip
apt install unzip
unzip vault_0.8.3_linux_amd64.zip
sudo mv vault /usr/bin
vault version
sudo mkdir /etc/vault.d
sudo touch /etc/vault.d/server.hcl
storage "file" {
path = "/mnt/vault/data"
}
listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = 1
}
vault server -config /etc/vault.d/server.hcl
Export the VAULT_ADDR
export VAULT_ADDR=http://127.0.0.0.1:8200
vault init
Unseal Key 1: Dg4b+HyyfOWOAveHdYXxZlZQSni9AKKR9QhjYSuHDhl2
Unseal Key 2: ZokjX02fcfEw6Cn6mvRIMATKbMY0IQ5qlbwwn+afAQMj
Unseal Key 3: uEhK3geZKMj4Oi7m2916GLHLIPgRojm8XsFkfglZGqtB
Unseal Key 4: LiX6Ei+mrX+SE87fe74dqt1mA8fFGeCRBX4lvCIyao9l
Unseal Key 5: kMynTwrBxFAsee2HNc13odq47Ir9L6o+oLlnlUO2StEr
Initial Root Token: 3debacdf-f513-8952-8bdf-f6b6e6cf16f5
export VAULT_TOKEN=3debacdf-f513-8952-8bdf-f6b6e6cf16f5
vault write secret/password value=badpassword
vault read secret/password
for i in `seq 1 20`
do
vault write secret/password$i value=`openssl rand -base64 24`
done
for i in `seq 1 20`
do
vault read secret/password$i
done
echo -n '{"value":"itsasecret"}' | vault write secret/password -