You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
2.7 KiB

  1. # Install from Source
  2. This page provides instructions on installing Tendermint from source.
  3. To download pre-built binaries, see the [Download page](/download).
  4. ## Install Go
  5. Make sure you have [installed Go](https://golang.org/doc/install) and set the `GOPATH`.
  6. ## Install Tendermint
  7. You should be able to install the latest with a simple
  8. ```
  9. go get github.com/tendermint/tendermint/cmd/tendermint
  10. ```
  11. Run `tendermint --help` for more.
  12. If the installation failed, a dependency may been updated and become incompatible with the latest Tendermint master branch.
  13. We solve this using the `glide` tool for dependency management.
  14. Fist, install `glide`:
  15. ```
  16. go get github.com/Masterminds/glide
  17. ```
  18. Now we can fetch the correct versions of each dependency by running:
  19. ```
  20. cd $GOPATH/src/github.com/tendermint/tendermint
  21. glide install
  22. go install ./cmd/tendermint
  23. ```
  24. Note that even though `go get` originally failed,
  25. the repository was still cloned to the correct location in the `$GOPATH`.
  26. The latest Tendermint Core version is now installed.
  27. ### Reinstall
  28. If you already have Tendermint installed, and you make updates,
  29. simply
  30. ```
  31. cd $GOPATH/src/github.com/tendermint/tendermint
  32. go install ./cmd/tendermint
  33. ```
  34. To upgrade, there are a few options:
  35. - set a new `$GOPATH` and run `go get github.com/tendermint/tendermint/cmd/tendermint`. This makes a fresh copy of everything for the new version.
  36. - run `go get -u github.com/tendermint/tendermint/cmd/tendermint`, where the `-u` fetches the latest updates for the repository and its dependencies
  37. - fetch and checkout the latest master branch in `$GOPATH/src/github.com/tendermint/tendermint`, and then run `glide install && go install ./cmd/tendermint` as above.
  38. Note the first two options should usually work, but may fail.
  39. If they do, use `glide`, as above:
  40. ```
  41. cd $GOPATH/src/github.com/tendermint/tendermint
  42. glide install
  43. go install ./cmd/tendermint
  44. ```
  45. Since the third option just uses `glide` right away, it should always work.
  46. ### Troubleshooting
  47. If `go get` failing bothers you, fetch the code using `git`:
  48. ```
  49. mkdir -p $GOPATH/src/github.com/tendermint
  50. git clone https://github.com/tendermint/tendermint $GOPATH/src/github.com/tendermint/tendermint
  51. cd $GOPATH/src/github.com/tendermint/tendermint
  52. glide install
  53. go install ./cmd/tendermint
  54. ```
  55. ### Run
  56. To start a one-node blockchain with a simple in-process application:
  57. ```
  58. tendermint init
  59. tendermint node --proxy_app=dummy
  60. ```
  61. See the
  62. [App Development](/docs/guides/app-development)
  63. guide for more details on building applications,
  64. and the
  65. [Using Tendermint](/docs/guides/using-tendermint)
  66. guide for more details about using the `tendermint` program.
  67. ## Next Step
  68. Learn how to [create your first ABCI app](/docs/getting-started/first-abci-app).