vault--源码安装

确认系统已经安装了go,version 1.10.1+

[root@node2 ~]# tar -C /usr/local -xzf go1.10.3.linux-amd64.tar.gz

  • 配置GOPATH:

[root@node2 ~]# mkdir /app/go_path
[root@node2 ~]# export GOPATH=/app/go_path

  • 下载vault的安装包

[root@node2 ~]# mkdir -p $GOPATH/src/github.com/hashicorp && cd $_
[root@node2 hashicorp]# git clone https://github.com/hashicorp/vault.git

  • 编译:

[root@node2 hashicorp]# cd vault/

[root@node2 vault]# make bootstrap

  • 配置环境变量并编译:

echo "PATH=$PATH:/usr/local/go/bin:/app/go_path/bin" >>/root/.bash_profile

export PATH=$PATH:/usr/local/go/bin:/app/go_path/bin

[root@node2 vault]# make dev

安装完成后会生成vault执行文件:

[root@node2 bin]# pwd
/app/go_path/src/github.com/hashicorp/vault/bin
[root@node2 bin]# ll
total 93672
-rwxr-xr-x 1 root root 95916982 Aug 13 17:30 vault

[root@node2 bin]# ./vault help
Usage: vault <command> [args]

Common commands:
    read        Read data and retrieves secrets
    write       Write data, configuration, and secrets
    delete      Delete secrets and configuration
    list        List data or secrets
    login       Authenticate locally
    agent       Start a Vault agent
    server      Start a Vault server
    status      Print seal and HA status
    unwrap      Unwrap a wrapped secret

Other commands:
    audit          Interact with audit devices
    auth           Interact with auth methods
    kv             Interact with Vault's Key-Value storage
    lease          Interact with leases
    namespace      Interact with namespaces
    operator       Perform operator-specific tasks
    path-help      Retrieve API help for paths
    plugin         Interact with Vault plugins and catalog
    policy         Interact with policies
    secrets        Interact with secrets engines
    ssh            Initiate an SSH session
    token          Interact with tokens

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值