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.

102 lines
2.6 KiB

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