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.

124 lines
2.7 KiB

7 years ago
  1. ---
  2. order: 3
  3. ---
  4. # Install Tendermint
  5. The fastest and easiest way to install the `tendermint` binary
  6. is to run [this script](https://github.com/tendermint/tendermint/blob/master/scripts/install/install_tendermint_ubuntu.sh) on
  7. a fresh Ubuntu instance,
  8. or [this script](https://github.com/tendermint/tendermint/blob/master/scripts/install/install_tendermint_bsd.sh)
  9. on a fresh FreeBSD instance. Read the comments / instructions carefully (i.e., reset your terminal after running the script,
  10. make sure you are okay with the network connections being made).
  11. ## From Binary
  12. To download pre-built binaries, see the [releases page](https://github.com/tendermint/tendermint/releases).
  13. ## From Source
  14. You'll need `go` [installed](https://golang.org/doc/install) and the required
  15. [environment variables set](https://github.com/tendermint/tendermint/wiki/Setting-GOPATH)
  16. ### Get Source Code
  17. ```
  18. mkdir -p $GOPATH/src/github.com/tendermint
  19. cd $GOPATH/src/github.com/tendermint
  20. git clone https://github.com/tendermint/tendermint.git
  21. cd tendermint
  22. ```
  23. ### Get Tools & Dependencies
  24. ```
  25. make tools
  26. ```
  27. ### Compile
  28. ```
  29. make install
  30. ```
  31. to put the binary in `$GOPATH/bin` or use:
  32. ```
  33. make build
  34. ```
  35. to put the binary in `./build`.
  36. _DISCLAIMER_ The binary of tendermint is build/installed without the DWARF symbol table. If you would like to build/install tendermint with the DWARF symbol and debug information, remove `-s -w` from `BUILD_FLAGS` in the make file.
  37. The latest `tendermint version` is now installed.
  38. ## Run
  39. To start a one-node blockchain with a simple in-process application:
  40. ```
  41. tendermint init
  42. tendermint node --proxy_app=kvstore
  43. ```
  44. ## Reinstall
  45. If you already have Tendermint installed, and you make updates, simply
  46. ```
  47. cd $GOPATH/src/github.com/tendermint/tendermint
  48. make install
  49. ```
  50. To upgrade, run
  51. ```
  52. cd $GOPATH/src/github.com/tendermint/tendermint
  53. git pull origin master
  54. make install
  55. ```
  56. ## Compile with CLevelDB support
  57. Install [LevelDB](https://github.com/google/leveldb) (minimum version is 1.7).
  58. Install LevelDB with snappy (optionally). Below are commands for Ubuntu:
  59. ```
  60. sudo apt-get update
  61. sudo apt install build-essential
  62. sudo apt-get install libsnappy-dev
  63. wget https://github.com/google/leveldb/archive/v1.20.tar.gz && \
  64. tar -zxvf v1.20.tar.gz && \
  65. cd leveldb-1.20/ && \
  66. make && \
  67. sudo cp -r out-static/lib* out-shared/lib* /usr/local/lib/ && \
  68. cd include/ && \
  69. sudo cp -r leveldb /usr/local/include/ && \
  70. sudo ldconfig && \
  71. rm -f v1.20.tar.gz
  72. ```
  73. Set a database backend to `cleveldb`:
  74. ```
  75. # config/config.toml
  76. db_backend = "cleveldb"
  77. ```
  78. To install Tendermint, run:
  79. ```
  80. CGO_LDFLAGS="-lsnappy" make install_c
  81. ```
  82. or run:
  83. ```
  84. CGO_LDFLAGS="-lsnappy" make build_c
  85. ```
  86. which puts the binary in `./build`.