2018-12-01 09:54:59 -08:00
## Install Gaia
2018-07-12 13:58:12 -07:00
2019-03-13 07:09:39 -07:00
This guide will explain how to install the `gaiad` and `gaiacli` entrypoints onto your system. With these installed on a server, you can participate in the mainnet as either a [Full Node ](./join-mainnet.md ) or a [Validator ](./validators/validator-setup.md ).
2018-07-12 13:58:12 -07:00
2018-12-01 09:54:59 -08:00
### Install Go
2018-07-12 13:58:12 -07:00
Install `go` by following the [official docs ](https://golang.org/doc/install ). Remember to set your `$GOPATH` , `$GOBIN` , and `$PATH` environment variables, for example:
```bash
mkdir -p $HOME/go/bin
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
2019-04-16 02:05:28 -07:00
echo "export GOBIN=\$GOPATH/bin" >> ~/.bash_profile
echo "export PATH=\$PATH:\$GOBIN" >> ~/.bash_profile
2019-03-22 13:53:37 -07:00
source ~/.bash_profile
2018-07-12 13:58:12 -07:00
```
::: tip
2019-05-03 03:33:41 -07:00
**Go 1.12.4+** is required for the Cosmos SDK.
2018-07-12 13:58:12 -07:00
:::
2018-12-01 09:54:59 -08:00
### Install the binaries
2018-07-12 13:58:12 -07:00
2019-05-04 07:03:22 -07:00
Next, let's install the latest version of Gaia. Make sure you `git checkout` the correct [released version ](https://github.com/cosmos/cosmos-sdk/releases ).
2018-07-12 13:58:12 -07:00
2019-03-13 07:09:39 -07:00
::: warning
2019-03-15 10:10:11 -07:00
For the mainnet, make sure your version if greater than `v0.33.0`
2019-03-13 07:09:39 -07:00
:::
2018-07-12 13:58:12 -07:00
```bash
mkdir -p $GOPATH/src/github.com/cosmos
cd $GOPATH/src/github.com/cosmos
git clone https://github.com/cosmos/cosmos-sdk
2019-05-04 07:03:22 -07:00
cd cosmos-sdk & & git checkout < latest-release-tag >
2019-01-28 09:49:13 -08:00
make tools install
2018-07-12 13:58:12 -07:00
```
2018-11-14 11:44:17 -08:00
> *NOTE*: If you have issues at this step, please check that you have the latest stable version of GO installed.
2018-07-12 13:58:12 -07:00
That will install the `gaiad` and `gaiacli` binaries. Verify that everything is OK:
```bash
2019-02-13 09:53:16 -08:00
$ gaiad version --long
$ gaiacli version --long
2018-07-12 13:58:12 -07:00
```
2019-02-13 09:53:16 -08:00
`gaiacli` for instance should output something similar to:
```
2019-03-13 07:09:39 -07:00
cosmos-sdk: 0.33.0
git commit: 7b4104aced52aa5b59a96c28b5ebeea7877fc4f0
2019-04-10 08:55:33 -07:00
vendor hash: 5db0df3e24cf10545c84f462a24ddc61882aa58f
2019-02-13 09:53:16 -08:00
build tags: netgo ledger
2019-03-13 07:09:39 -07:00
go version go1.12 linux/amd64
2019-02-13 09:53:16 -08:00
```
##### Build Tags
Build tags indicate special features that have been enabled in the binary.
| Build Tag | Description |
| --------- | ----------------------------------------------- |
| netgo | Name resolution will use pure Go code |
| ledger | Ledger devices are supported (hardware wallets) |
2019-02-15 07:36:37 -08:00
### Install binary distribution via snap (Linux only)
2019-03-15 10:10:11 -07:00
**Do not use snap at this time to install the binaries for production until we have a reproducible binary system.**
2019-02-15 07:36:37 -08:00
2018-12-01 09:54:59 -08:00
### Next
2018-07-12 13:58:12 -07:00
2019-03-13 07:09:39 -07:00
Now you can [join the mainnet ](./join-mainnet.md ), [the public testnet ](./join-testnet.md ) or [create you own testnet ](./deploy-testnet.md )