After that, go to the go-wemix directory and run the command below to start gwemix build. Depending on the USE_ROCKSDB option, it is built as Rocksdb or Leveldb. Since the two databases are not compatible, you must check the db type and version when using chain data received from another machine.
This chapter is explained based on Ubuntu environment. To build gwemix from source code directly in Ubuntu environment, you need to follow the steps below.
git clone https://github.com/wemixarchive/go-wemix.git
cd go-wemix
In case of rocksdb
make
In case of leveldb
make USE_ROCKSDB=NO
Copy and untar "build" to $GWEMIX_HOME
GWEMIX_HOME='/opt/gwemix'
sudo mkdir -p $GWEMIX_HOME
sudo chown $USER:$USER $GWEMIX_HOME
cp build/gwemix.tar.gz $GWEMIX_HOME/
cd $GWEMIX_HOME
tar xvzf gwemix.tar.gz
Create .rc at $GWEMIX_HOME with the following info
Start gwemix
Check log
Dependency
Rocksdb only
Install go version 1.18.4
Download source code
In case of rocksdb
In case of leveldb
Copy and untar "build" to $GWEMIX_HOME
Create .rc at $GWEMIX_HOME with the following info
Start gwemix
Check log
When executing the make, logrot and gwemix.tar.gz are built at once for convenience of installation and are saved as compressed files in the build directory. The generated gwemix.tar.gz contains the following files.
Build with Docker Image
WEMIX3.0 can use docker images to solve cases where library dependencies are a problem. When building on Linux or MacOS X, you can build it through the following process.
Currently, docker build is not supported in Apple Chip MacOS environment and Windows environment, and support will be provided in the future.
To install the gwemix.tar.gz binary built through Docker by copying it to the Ubuntu environment, follow the steps below.
PORT=8588
DISCOVER=1 # 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
GWEMIX_OPTS="--maxpeers=100"
git clone https://github.com/wemixarchive/go-wemix.git
cd go-wemix
make
make USE_ROCKSDB=NO
GWEMIX_HOME='/opt/gwemix'
sudo mkdir -p $GWEMIX_HOME
sudo chown $USER:$USER $GWEMIX_HOME
cp build/gwemix.tar.gz $GWEMIX_HOME/
cd $GWEMIX_HOME
tar xvzf gwemix.tar.gz
PORT=8588
DISCOVER=1 # 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
GWEMIX_OPTS="--maxpeers=100"
GWEMIX_HOME='/opt/gwemix'
sudo mkdir -p $GWEMIX_HOME
sudo chown $USER:$USER $GWEMIX_HOME
cp build/gwemix.tar.gz $GWEMIX_HOME/
cd $GWEMIX_HOME
tar xvzf gwemix.tar.gz
PORT=8588
DISCOVER=1 # 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
GWEMIX_OPTS="--maxpeers=100"
$GWEMIX_HOME/bin/gwemix.sh start
tail -F $GWEMIX_HOME/logs/log
sudo apt-get isntall libjemalloc1
GWEMIX_HOME='/opt/gwemix'
sudo mkdir -p $GWEMIX_HOME
sudo chown $USER:$USER $GWEMIX_HOME
cp build/gwemix.tar.gz $GWEMIX_HOME/
cd $GWEMIX_HOME
tar xvzf gwemix.tar.gz
PORT=8588
DISCOVER=1 # 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
GWEMIX_OPTS="--maxpeers=100"