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.git
Build 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 golang
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.1xx
Download source code
git clone https://github.com/METADIUM/go-metadium.git
cd go-metadium
Make-build (in case of rocksdb)
make USE_ROCKSDB=YES
Make-build (in case of leveldb)
make USE_ROCKSDB=NO
Copy 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.gz
Start gmet
$GMET_HOME/bin/gmet.sh start
Check log
tail -F $GMET_HOME/logs/log
Configuration
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 options
Last updated