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.7 KiB

6 years ago
  1. # Install Tendermint
  2. The fastest and easiest way to install the `tendermint` binary
  3. is to run [this script](https://github.com/tendermint/tendermint/blob/master/scripts/install/install_tendermint_ubuntu.sh) on
  4. a fresh Ubuntu instance,
  5. or [this script](https://github.com/tendermint/tendermint/blob/master/scripts/install/install_tendermint_bsd.sh)
  6. on a fresh FreeBSD instance. Read the comments / instructions carefully (i.e., reset your terminal after running the script,
  7. make sure you are okay with the network connections being made).
  8. ## From Binary
  9. To download pre-built binaries, see the [releases page](https://github.com/tendermint/tendermint/releases).
  10. ## From Source
  11. You'll need `go` [installed](https://golang.org/doc/install) and the required
  12. [environment variables set](https://github.com/tendermint/tendermint/wiki/Setting-GOPATH)
  13. ### Get Source Code
  14. ```
  15. mkdir -p $GOPATH/src/github.com/tendermint
  16. cd $GOPATH/src/github.com/tendermint
  17. git clone https://github.com/tendermint/tendermint.git
  18. cd tendermint
  19. ```
  20. ### Get Tools & Dependencies
  21. ```
  22. make tools
  23. ```
  24. ### Compile
  25. ```
  26. make install
  27. ```
  28. to put the binary in `$GOPATH/bin` or use:
  29. ```
  30. make build
  31. ```
  32. to put the binary in `./build`.
  33. _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.
  34. The latest `tendermint version` is now installed.
  35. ## Run
  36. To start a one-node blockchain with a simple in-process application:
  37. ```
  38. tendermint init
  39. tendermint node --proxy_app=kvstore
  40. ```
  41. ## Reinstall
  42. If you already have Tendermint installed, and you make updates, simply
  43. ```
  44. cd $GOPATH/src/github.com/tendermint/tendermint
  45. make install
  46. ```
  47. To upgrade, run
  48. ```
  49. cd $GOPATH/src/github.com/tendermint/tendermint
  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. ```
  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. ```
  72. # config/config.toml
  73. db_backend = "cleveldb"
  74. ```
  75. To install Tendermint, run:
  76. ```
  77. CGO_LDFLAGS="-lsnappy" make install_c
  78. ```
  79. or run:
  80. ```
  81. CGO_LDFLAGS="-lsnappy" make build_c
  82. ```
  83. which puts the binary in `./build`.