| order | 1 |
|---|
Install the latest version of CometBFT's Go package:
go install github.com/cometbft/cometbft/cmd/cometbft@latestInstall a specific version of CometBFT's Go package:
go install github.com/cometbft/cometbft/cmd/[email protected]To download pre-built binaries, see the releases page.
You'll need go installed and the required
environment variables set, which can be done with the following commands:
echo export GOPATH=\"\$HOME/go\" >> ~/.bash_profile
echo export PATH=\"\$PATH:\$GOPATH/bin\" >> ~/.bash_profilegit clone https://github.com/cometbft/cometbft.git
cd cometbftmake installto put the binary in $GOPATH/bin or use:
make buildto put the binary in ./build.
DISCLAIMER The binary of CometBFT is build/installed without the DWARF
symbol table. If you would like to build/install CometBFT with the DWARF
symbol and debug information, remove -s -w from BUILD_FLAGS in the make
file.
The latest CometBFT is now installed. You can verify the installation by running:
cometbft versionIf you already have CometBFT installed, and you make updates, simply
make installTo upgrade, run
git pull origin main
make installNOTE: cleveldb is deprecated and will be removed in a future release.
Install LevelDB (minimum version is 1.7).
Install LevelDB with snappy (optionally). Below are commands for Ubuntu:
sudo apt-get update
sudo apt install build-essential
sudo apt-get install libsnappy-dev
wget https://github.com/google/leveldb/archive/v1.23.tar.gz && \
tar -zxvf v1.23.tar.gz && \
cd leveldb-1.23/ && \
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.23.tar.gzSet a database backend to cleveldb:
# config/config.toml
db_backend = "cleveldb"To install CometBFT, run:
CGO_LDFLAGS="-lsnappy" make install COMETBFT_BUILD_OPTIONS=cleveldbor run:
CGO_LDFLAGS="-lsnappy" make build COMETBFT_BUILD_OPTIONS=cleveldbwhich puts the binary in ./build.