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.

128 lines
2.4 KiB

6 years ago
  1. ---
  2. order: 3
  3. ---
  4. # Install Tendermint
  5. ## From Binary
  6. To download pre-built binaries, see the [releases page](https://github.com/tendermint/tendermint/releases).
  7. ## Using Homebrew
  8. You can also install the Tendermint binary by simply using homebrew,
  9. ```
  10. brew install tendermint
  11. ```
  12. ## From Source
  13. You'll need `go` [installed](https://golang.org/doc/install) and the required
  14. environment variables set, which can be done with the following commands:
  15. ```sh
  16. echo export GOPATH=\"\$HOME/go\" >> ~/.bash_profile
  17. echo export PATH=\"\$PATH:\$GOPATH/bin\" >> ~/.bash_profile
  18. ```
  19. Get the source code:
  20. ```sh
  21. git clone https://github.com/tendermint/tendermint.git
  22. cd tendermint
  23. ```
  24. Then run:
  25. ```sh
  26. make install
  27. ```
  28. to put the binary in `$GOPATH/bin` or use:
  29. ```sh
  30. make build
  31. ```
  32. to put the binary in `./build`.
  33. _DISCLAIMER_ The binary of Tendermint is build/installed without the DWARF
  34. symbol table. If you would like to build/install Tendermint with the DWARF
  35. symbol and debug information, remove `-s -w` from `BUILD_FLAGS` in the make
  36. file.
  37. The latest Tendermint is now installed. You can verify the installation by
  38. running:
  39. ```sh
  40. tendermint version
  41. ```
  42. ## Run
  43. To start a one-node blockchain with a simple in-process application:
  44. ```sh
  45. tendermint init validator
  46. tendermint start --proxy-app=kvstore
  47. ```
  48. ## Reinstall
  49. If you already have Tendermint installed, and you make updates, simply
  50. ```sh
  51. make install
  52. ```
  53. To upgrade, run
  54. ```sh
  55. git pull origin master
  56. make install
  57. ```
  58. ## Compile with CLevelDB support
  59. Install [LevelDB](https://github.com/google/leveldb) (minimum version is 1.7).
  60. Install LevelDB with snappy (optionally). Below are commands for Ubuntu:
  61. ```sh
  62. sudo apt-get update
  63. sudo apt install build-essential
  64. sudo apt-get install libsnappy-dev
  65. wget https://github.com/google/leveldb/archive/v1.20.tar.gz && \
  66. tar -zxvf v1.20.tar.gz && \
  67. cd leveldb-1.20/ && \
  68. make && \
  69. sudo cp -r out-static/lib* out-shared/lib* /usr/local/lib/ && \
  70. cd include/ && \
  71. sudo cp -r leveldb /usr/local/include/ && \
  72. sudo ldconfig && \
  73. rm -f v1.20.tar.gz
  74. ```
  75. Set a database backend to `cleveldb`:
  76. ```toml
  77. # config/config.toml
  78. db_backend = "cleveldb"
  79. ```
  80. To install Tendermint, run:
  81. ```sh
  82. CGO_LDFLAGS="-lsnappy" make install TENDERMINT_BUILD_OPTIONS=cleveldb
  83. ```
  84. or run:
  85. ```sh
  86. CGO_LDFLAGS="-lsnappy" make build TENDERMINT_BUILD_OPTIONS=cleveldb
  87. ```
  88. which puts the binary in `./build`.