Build Spartancoin On Ubuntu
Not logged in

A. Build Spartancoin-Qt On Ubuntu

Install Required Packages

$ sudo passwd                 <- if you want to set the root password.
$ su -
# apt install -y fossil libboost-all-dev libssl-dev libdb++-dev libqrencode-dev make gcc g++ qt5-default qttools5-dev-tools

Clone Xjail/Spartancoin Code

$ fossil clone https://www.fossil.tiv.cc/xjail/spartancoin spartancoin.fossil
$ mkdir spartancoin
$ cd spartancoin
$ fossil open ../spartancoin.fossil

Build spartancoin-qt

Your terminal should already cd into spartancoin fossil open folder now.

$ qmake
$ make

When finish building, the spartancoin-qt will be successfully generated.

Install and Configure SpartanCoin-Qt

$ mkdir -p ~/bin/
$ cp spartancoin-qt ~/bin/
$ cd
$ echo 'export PATH=${HOME}/bin:${PATH}' >> ~/.bashrc
Please Logout and Login again!
$ spartancoin-qt

After a while, a spartancoin-qt window should be opened. It will create folder ~/.spartancoin and create ~/.spartancoin/wallet.dat by default.

Encrypt your wallet.dat and backup it if you want or if you transfer some coins into your wallet.

Block Chain Data Synchronization

After opening the spartancoin wallet window, the app will begin to find peers automatically. Please wait for one or two minutes.

B. Build spartancoind On Ubuntu

If you want to run a spartancoin peer on console, you don't need a desktop.

Build spartancoind

To build spartancoind, you don't need to build spartancoin-qt first, And you don't need to install Qt toolkit.

$ cd spartancoin/src/
$ make -f makefile.unix

Configure spartancoind

$ cp spartancoind ~/bin                                                                   
$ cd ~/.spartancoin
$ vim spartancoin.conf

You should have installed vim-nox or other editors.

Then write some lines into spartancoin.conf like these:

# spartancoin.conf
rpcuser=TheUsername
rpcpassword=ThePassword
server=1
daemon=1
listen=1

Then just type spartancoind to launch the spartandoin daemon.

$ spartancoind
Spartancoin server starting

spartancoind command line usage

You should close the spartancoin-qt window and run these commands.

getinfo:

$ spartancoind getinfo

getpeerinfo:

$ spartancoind getpeerinfo

help:

$ spartancoind help

stop:

$ spartancoind stop

--help (Read Startup Options):

$ spartancoind --help