# Install Tendermint

# From Binary

To download pre-built binaries, see the releases page.

# From Source

You'll need go installed and the required environment variables set, which can be done with the following commands:

Copyecho export GOPATH=\"\$HOME/go\" >> ~/.bash_profile echo export PATH=\"\$PATH:\$GOPATH/bin\" >> ~/.bash_profile echo export GO111MODULE=on >> ~/.bash_profile Expand

# Get Source Code

Copymkdir -p $GOPATH/src/github.com/tendermint cd $GOPATH/src/github.com/tendermint git clone https://github.com/tendermint/tendermint.git cd tendermint Expand

# Get Tools & Dependencies

Copymake tools Expand

# Compile

Copymake install Expand

to put the binary in $GOPATH/bin or use:

Copymake build Expand

to put the binary in ./build.

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.

The latest tendermint is now installed. You can verify the installation by running:

Copytendermint version Expand

# Run

To start a one-node blockchain with a simple in-process application:

Copytendermint init tendermint node --proxy_app=kvstore Expand

# Reinstall

If you already have Tendermint installed, and you make updates, simply

Copycd $GOPATH/src/github.com/tendermint/tendermint make install Expand

To upgrade, run

Copycd $GOPATH/src/github.com/tendermint/tendermint git pull origin master make install Expand

# Compile with CLevelDB support

Install LevelDB (minimum version is 1.7).

Install LevelDB with snappy (optionally). Below are commands for Ubuntu:

Copysudo apt-get update sudo apt install build-essential sudo apt-get install libsnappy-dev wget https://github.com/google/leveldb/archive/v1.20.tar.gz && \ tar -zxvf v1.20.tar.gz && \ cd leveldb-1.20/ && \ make && \ sudo cp -r out-static/lib* out-shared/lib* /usr/local/lib/ && \ cd include/ && \ sudo cp -r leveldb /usr/local/include/ && \ sudo ldconfig && \ rm -f v1.20.tar.gz Expand

Set a database backend to cleveldb:

Copy# config/config.toml db_backend = "cleveldb" Expand

To install Tendermint, run:

CopyCGO_LDFLAGS="-lsnappy" make install_c Expand

or run:

CopyCGO_LDFLAGS="-lsnappy" make build_c Expand

which puts the binary in ./build.