2018-06-20 03:51:16 -04:00
# Install Tendermint
The fastest and easiest way to install the `tendermint` binary
2019-07-08 19:54:24 +02:00
is to run [this script ](https://github.com/tendermint/tendermint/blob/master/scripts/install/install_tendermint_ubuntu.sh ) on
2018-06-20 03:51:16 -04:00
a fresh Ubuntu instance,
2019-07-08 19:54:24 +02:00
or [this script ](https://github.com/tendermint/tendermint/blob/master/scripts/install/install_tendermint_bsd.sh )
2018-06-20 03:51:16 -04:00
on a fresh FreeBSD instance. Read the comments / instructions carefully (i.e., reset your terminal after running the script,
2018-09-08 08:45:12 -04:00
make sure you are okay with the network connections being made).
2018-06-20 03:51:16 -04:00
## From Binary
To download pre-built binaries, see the [releases page ](https://github.com/tendermint/tendermint/releases ).
## From Source
You'll need `go` [installed ](https://golang.org/doc/install ) and the required
[environment variables set ](https://github.com/tendermint/tendermint/wiki/Setting-GOPATH )
### Get Source Code
```
mkdir -p $GOPATH/src/github.com/tendermint
cd $GOPATH/src/github.com/tendermint
git clone https://github.com/tendermint/tendermint.git
cd tendermint
```
### Get Tools & Dependencies
```
make get_tools
```
### Compile
```
make install
```
to put the binary in `$GOPATH/bin` or use:
```
make build
```
to put the binary in `./build` .
2019-06-24 20:13:25 +02:00
_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.
2018-06-20 03:51:16 -04:00
The latest `tendermint version` is now installed.
2018-09-05 16:49:34 +04:00
## Run
To start a one-node blockchain with a simple in-process application:
```
tendermint init
tendermint node --proxy_app=kvstore
```
2018-06-20 03:51:16 -04:00
## Reinstall
If you already have Tendermint installed, and you make updates, simply
```
cd $GOPATH/src/github.com/tendermint/tendermint
make install
```
2018-07-04 12:00:57 -04:00
To upgrade, run
2018-06-20 03:51:16 -04:00
```
cd $GOPATH/src/github.com/tendermint/tendermint
git pull origin master
make install
```
2018-09-05 16:49:34 +04:00
## Compile with CLevelDB support
2018-06-20 03:51:16 -04:00
2018-09-23 01:14:05 -04:00
Install [LevelDB ](https://github.com/google/leveldb ) (minimum version is 1.7).
2019-05-07 12:33:47 +04:00
Install LevelDB with snappy (optionally). Below are commands for Ubuntu:
2018-06-20 03:51:16 -04:00
```
2018-09-05 16:49:34 +04:00
sudo apt-get update
2018-09-17 13:25:17 +04:00
sudo apt install build-essential
2018-09-05 16:49:34 +04:00
2018-09-17 13:25:17 +04:00
sudo apt-get install libsnappy-dev
2018-09-05 16:49:34 +04:00
2018-09-17 13:25:17 +04:00
wget https://github.com/google/leveldb/archive/v1.20.tar.gz & & \
tar -zxvf v1.20.tar.gz & & \
cd leveldb-1.20/ & & \
make & & \
2018-11-20 10:27:58 +04:00
sudo cp -r out-static/lib* out-shared/lib* /usr/local/lib/ & & \
2018-09-17 13:25:17 +04:00
cd include/ & & \
2018-11-20 10:27:58 +04:00
sudo cp -r leveldb /usr/local/include/ & & \
2018-09-17 13:25:17 +04:00
sudo ldconfig & & \
rm -f v1.20.tar.gz
2018-09-05 16:49:34 +04:00
```
2019-05-07 12:33:47 +04:00
Set a database backend to `cleveldb` :
2018-09-05 16:49:34 +04:00
```
# config/config.toml
db_backend = "cleveldb"
```
2019-05-07 12:33:47 +04:00
To install Tendermint, run:
2018-09-05 16:49:34 +04:00
```
2018-11-28 17:25:23 +04:00
CGO_LDFLAGS="-lsnappy" make install_c
```
2019-05-07 12:33:47 +04:00
or run:
2018-11-28 17:25:23 +04:00
2018-06-20 03:51:16 -04:00
```
2018-11-28 17:25:23 +04:00
CGO_LDFLAGS="-lsnappy" make build_c
```
2019-05-07 12:33:47 +04:00
which puts the binary in `./build` .