wasmd/docs/installation.md

96 lines
2.8 KiB
Markdown
Raw Normal View History

# Install Gaia
2019-05-21 08:22:22 -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).
2019-05-21 08:22:22 -07:00
## Install Go
2019-05-21 08:22:22 -07:00
Install `go` by following the [official docs](https://golang.org/doc/install).
Remember to set your `$GOPATH` and `$PATH` environment variables, for example:
2019-05-21 08:22:22 -07:00
```bash
mkdir -p $HOME/go/bin
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.bash_profile
source ~/.bash_profile
```
::: tip
**Go 1.12+** is required for the Cosmos SDK.
:::
## Install the binaries
2019-05-21 08:22: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/gaia/releases).
2019-05-21 08:22:22 -07:00
```bash
git clone -b <latest-release-tag> https://github.com/cosmos/gaia
cd gaia && make install
```
If this command fails due to the following error message, you might have already set `LDFLAGS` prior to running this step.
```
# github.com/cosmos/gaia/cmd/gaiad
flag provided but not defined: -L
usage: link [options] main.o
...
make: *** [install] Error 2
```
Unset this environment variable and try again.
```
LDFLAGS="" make install
```
> _NOTE_: If you still have issues at this step, please check that you have the latest stable version of GO installed.
2019-05-21 08:22:22 -07:00
That will install the `gaiad` and `gaiacli` binaries. Verify that everything is OK:
```bash
$ gaiad version --long
$ gaiacli version --long
```
`gaiacli` for instance should output something similar to:
```shell
name: gaia
server_name: gaiad
client_name: gaiacli
version: 1.0.0
commit: 89e6316a27343304d332aadfe2869847bf52331c
build_tags: netgo,ledger
go: go version go1.12.5 darwin/amd64
2019-05-21 08:22:22 -07:00
```
### Build Tags
2019-05-21 08:22:22 -07:00
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) |
### Install binary distribution via snap (Linux only)
**Do not use snap at this time to install the binaries for production until we have a reproducible binary system.**
## Developer Workflow
2019-06-05 11:13:12 -07:00
To test any changes made in the SDK or Tendermint, a `replace` clause needs to be added to `go.mod` providing the correct import path.
- Make appropriate changes
- Add `replace github.com/cosmos/cosmos-sdk => /path/to/clone/cosmos-sdk` to `go.mod`
- Run `make clean install` or `make clean build`
- Test changes
2019-05-21 08:22:22 -07:00
## Next
2019-05-21 08:22:22 -07:00
2019-06-12 05:44:24 -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)