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.

120 lines
2.2 KiB

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