Building Qtum on Linux

Building Qtum Core on Debian/Ubuntu

Installing dependencies (This will work for Ubuntu and Debian)

sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev libgmp3-dev

Compiling Qtum Core from source

From Github source:

git clone https://github.com/qtumproject/qtum --recursive
cd qtum && make -C depends/
DEPENDS="$(pwd)/depends/x86_64-pc-linux-gnu"
./autogen.sh
./configure --prefix=$DEPENDS
make
make install

This will install all the Qtum binaries on depends/x86_64-pc-linux-gnu

From a release file:

wget https://github.com/qtumproject/qtum/archive/refs/tags/mainnet-fastlane-v0.20.2.tar.gz
tar -xpf mainnet-fastlane-v0.20.2.tar.gz && cd qtum-mainnet-fastlane-v0.20.2 
git clone --recursive https://github.com/qtumproject/cpp-eth-qtum.git src/cpp-ethereum
make -C depends/
DEPENDS="$(pwd)/depends/x86_64-pc-linux-gnu"
./autogen.sh
./configure --prefix=$DEPENDS
make
make install

This will install all the Qtum binaries on depends/x86_64-pc-linux-gnu

Running Qtum Core

Type from a terminal:

qtumd -daemon

Also, make sure to create a qtum.conf with your credentials if needed for accessing RPC calls.

This is a sample qtum.conf file

rpcuser=qtum
rpcassword=coin
server=1
rpcallowip=127.0.0.1
logevents=1
daemon=1

QRC20 Tokens on Qtum Core

Enabling Log events

add logevents=1 to the qtum.conf file before launching the daemon

Run Qtum like this:

qtumd -daemon -logevents -txindex=1

If Qtum has already synced, you'll need to reindex blocks:

qtumd -daemon -reindex

Build Qtum on CentOS 7

CentOS is an enterprise-oriented Linux distribution, that means it's focused for stability and security but not necessarily the latest software. With that being said, you cannot currently build Qtum in CentOS 7 following the steps that other more recent distributions can use.

In this document we'll show how to build Qtum in CentOS 7 and produce a static binary which can then be executed on any other Linux distribution, even if it's more recent.

General Prerequisites

Update Yum repositories

    sudo yum update

Install development tools and libraries

Getting ready:

sudo yum install -y tar unzip git which wget patch make autoconf automake libtool \
    epel-release centos-release-scl centos-release-scl-rh finduitls vim mc openssl-devel \
    file

Enable Devtoolset-7

yum install -y devtoolset-7-gcc* && \
    echo "source scl_source enable devtoolset-7" >> /root/.bashrc
source scl_source enable devtoolset-7

Clone Qtum Github source:

git clone --recurse-submodules --depth 1 https://github.com/qtumproject/qtum

Building Qtum

cd qtum && make -C depends/
DEPENDS="$(pwd)/depends/x86_64-pc-linux-gnu"
./autogen.sh
./configure --prefix=$DEPENDS
make

Please keep in mind, this will produce a static build and it will take longer than a normal build.

Last updated