Install Gmet
This document explains the gmet configuration and building process for setting up a Metadium BP node. This installation process is only necessary when building directly from the source code and not using pre-built files from GitHub.
Download Source Code
The go-metadium source code is publicly available on the Metadium GitHub repository; download it as follows:
git clone https://github.com/METADIUM/go-metadium.gitBuild Gmet
Metadium's gmet supports rocksdb and leveldb, and you can choose the version to build using the USE_ROCKSDB option during the build process. Each version has a different format for the generated chain data, and they are not mutually compatible, so be sure to check the DB version you want to use before proceeding.
Below is the command for building, written based on the Ubuntu operating system recommended by Metadium:
Dependency
sudo apt-get update
sudo apt-get install -y build-essential golangRocksdb only
sudo apt-get install -y libsnappy-dev libjemalloc-dev
cd /usr/lib/x86_64-linux-gnu/
sudo ln -sf libjemalloc.so.2 libjemalloc.so.1xxDownload source code
git clone https://github.com/METADIUM/go-metadium.git
cd go-metadiumMake-build (in case of rocksdb)
make USE_ROCKSDB=YES Make-build (in case of leveldb)
make USE_ROCKSDB=NOCopy and untar "build" to $GMET_HOME
GMET_HOME='/opt/meta'
sudo mkdir -p $GMET_HOME
sudo chown $USER:$USER $GMET_HOME
cp build/metadium.tar.gz $GMET_HOME/
cd $GMET_HOME
tar xvzf metadium.tar.gzStart gmet
$GMET_HOME/bin/gmet.sh startCheck log
tail -F $GMET_HOME/logs/logDependency
sudo apt-get update
sudo apt-get install -y build-essential Rocksdb only
sudo apt-get install -y libsnappy-dev libjemalloc-dev
cd /usr/lib/x86_64-linux-gnu/
sudo ln -sf libjemalloc.so.2 libjemalloc.so.1xxInstall go version 1.18.4
wget https://go.dev/dl/go1.18.4.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
source $HOME/.profile Download source code
git clone https://github.com/METADIUM/go-metadium.git
cd go-metadiumIn case of rocksdb
makeIn case of leveldb
make USE_ROCKSDB=NOCopy and untar "build" to $GMET_HOME
GMET_HOME='/opt/meta'
sudo mkdir -p $GMET_HOME
sudo chown $USER:$USER $GMET_HOME
cp build/metadium.tar.gz $GMET_HOME/
cd $GMET_HOME
tar xvzf metadium.tar.gzStart gmet
$GMET_HOME/bin/gmet.sh startCheck log
tail -F $GMET_HOME/logs/logConfiguration
Once the build is complete, you can run the gmet node using the gmet.sh script. The gmet.sh script allows you to specify parameters for running the gmet node by creating a .rc configuration file for easy setup.
# vi $GMET_HOME/.rc
PORT=8588
DISCOVER=0 # 1 for enable discovery mode, 0 for disable discovery mode
TESTNET=1 # 1 for Testnet or remove this line for Mainnet
SYNC_MODE=full # snap, full or archive
GMET_OPTS="" # setup additional optionsLast updated