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.

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