Setup Chaincoin Masternode on Raspberry Pi3

in #chaincoin7 years ago (edited)

Great Tut on how to get your Masternode up and running on Raspberry Pi3. Run through from top to bottom.

You will need:
8Gb Micro SD Card (preferably Class 10 or above with wear protection)
Raspberry Pi3 : http://amzn.to/2t9o7zJ

First set the Firewall premissions.

sudo ufw allow ssh/tcp
sudo ufw allow 8333
sudo ufw allow 11994
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw enable

Lets install the dependencies.

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install build-essential automake autoconf libssl-dev g++ libminiupnpc-dev git libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev libtool libevent-dev -y

If you have a big SD, no need to do this. You can also delete the swap at the end!
*You dont have to do this step

sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=1024

sudo dphys-swapfile setup
sudo dphys-swapfile swapon

Create the directory for clone

mkdir ~/chaincoin
cd ~/chaincoin

Clone the Repo

wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
tar -xzvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix/
../dist/configure --enable-cxx

Note the -j4 flag installs using all four cores on the Raspberry Pi

make -j4
sudo make install

cd chaincoin

git clone https://github.com/chaincoin/chaincoin.git

cd ~/chaincoin/
./autogen.sh
./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --enable-upnp-default --without-gui
make -j2
sudo make install

cd ~/.chaincoin/
mkdir ~/.chaincoin/ ( Make it if it doesnt exsist.)

touch chaincoin.conf
nano chaincoin.conf and add the following:

rpcuser=username
rpcpassword=password
server=1

If you get the path error

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/BerkeleyDB.4.8/lib"

Commands needed.

chaincoind --daemon
chaincoind getinfo
chaincoind getaccountaddress 0
chaincoind masternode genkey
chaincoind stop

nano ~/.chaincoin/chaincoin.conf

listen=1
masternode=1
masternodeprivkey=masternodekey
masternodeaddr=<your_server_ip>:11994

Remember earlier we increased the swap file size. Some people choose to disable Swapfile altogether by setting CONF_SWAPSIZE=0 .

sudo chmod -x /etc/init.d/dphys-swapfile
sudo swapoff -a
sudo rm /var/swap

Note to re-enable just reverse the process:

sudo chmod +x /etc/init.d/dphys-swapfile
sudo dphys-swapfile setup
sudo dphys-swapfile swapon

Like my content? You can tip me here:

BTC: 1BKAbcowg68WytyPbwbFihNJBXpPSFj6u1
Use the code "aGbFSY" and get 3% on Cloud mining at https://www.genesis-mining.com/a/926266

Sort:  

Great tutorial. Just ordered my raspberry Pi :)

Good job, it will help all the HODLers ☺️

Great use of a Raspberry Pi3, let me order one now!

Hi, what happens if sd card of pi fails?

Coin Marketplace

STEEM 0.30
TRX 0.11
JST 0.033
BTC 64243.42
ETH 3152.93
USDT 1.00
SBD 4.28