cosmos-sdk/docs/translations/cn/gaia/installation.md

2.1 KiB
Raw Blame History

安装Gaia

本教程将详细说明如何在你的系统上安装gaiadgaiacli。安装后,你可以作为全节点或是验证人节点加入到主网。

安装Go

按照官方文档安装go。记得设置环境变量$GOPATH,$GOBIN$PATH:

mkdir -p $HOME/go/bin
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
echo "export GOBIN=\$GOPATH/bin" >> ~/.bash_profile
echo "export PATH=\$PATH:\$GOBIN" >> ~/.bash_profile
echo "export GO111MODULE=on" >> ~/.bash_profile
source ~/.bash_profile

::: 提示 Cosmos SDK需要安装Go 1.12.1+ :::

安装二进制执行程序

接下来安装最新版本的Gaia。这里我们使用master分支,包含了最新的稳定发布版本。如果需要,请通过git checkout命令确定是正确的发布版本

::: 警告 对于主网,请确保你的版本大于或等于v0.33.0 :::

mkdir -p $GOPATH/src/github.com/cosmos
cd $GOPATH/src/github.com/cosmos
git clone https://github.com/cosmos/cosmos-sdk
cd cosmos-sdk && git checkout master
make tools install

注意: 如果在这一步中出现问题请检查你是否安装的是Go的最新稳定版本。

gaiadgaiacli可执行程序安装完之后,请检查:

$ gaiad version --long
$ gaiacli version --long

gaiacli的返回应该类似于:

cosmos-sdk: 0.33.0
git commit: 7b4104aced52aa5b59a96c28b5ebeea7877fc4f0
go.sum hash: d156153bd5e128fec3868eca9a1397a63a864edb5cfa0ac486db1b574b8eecfe
build tags: netgo ledger
go version go1.12 linux/amd64
Build Tags

build tags指定了可执行程序具有的特殊特性。

Build Tag Description
netgo Name resolution will use pure Go code
ledger 支持Ledger设备(硬件钱包)

接下来

然后你可以选择 加入公共测试网 或是 创建私有测试网。