Build a headless Solarcoin node on Raspberry Pi

in cryptocurrency •  8 years ago  (edited)

solarcoin3c82d.md.jpg

Original source : @Steven from the Solarcoin Telegram channel

The distribution version we need to flash on the SD card is the lastest Stable Raspbian Image from: https://www.raspberrypi.org/downloads/raspbian/

Setup Raspbian in the Pi

  • Insert the flashed SD with Raspbian in the Raspberry Pi 2/3.
  • Plug in the USB mouse, the USB keyboard, the HDMI screen, the network cable, and the power cable.

The Raspberry Pi will boot for the first time and you will be presented with the Raspberry Pi Software Configuration Tool (raspi-config). To navigate in this tool, the useful keys are: The up/down arrow, the Enter key, and the Tab key whenever the up/down arrow keys don’t do the job. Here, we will do next things:

  • Expand the Filesystem by choosing option 1 and Reboot. You will get a message Root partition has been resized.
  • Select your Proper Time Zone and Change the User Password by choosing option 2. Enter your new password twice. When entering the password, the characters won’t be displayed as a security feature. You will get a message Password changed successfully.

We are done with the raspi-config tool. Select Finish and reboot the Pi.

Note: If you ever need to open the raspi-config tool again, simply type sudo raspi-config at the Terminal.

Update the Raspberry Pi device.

Run the following commands:

sudo apt-get update
sudo apt-get upgrade

*When asked to do so, press the y key followed by the Enter key. You will need to that every time the message appears in the other steps below.

Setting up the Raspberry Pi for compiling Solarcoin.

  • Change Swap Size.

Use the following command to change the default swap size:

sudo nano /etc/dphys-swapfile

Make sure it reads CONF_SWAPSIZE=1024 Use the left/right arrow keys to navigate the file. After change is done, press Ctrl+O followed by the Enter key to save the file. Then, press Ctrl+X to exit the editor.

Use the following commands to enable the swap file with its new size:

sudo dphys-swapfile setup
sudo dphys-swapfile swapon

You can check the new active swap size with next command:

free -m
  • Install Required Dependencies with next commands:
sudo apt-get install autoconf libevent-dev libtool libssl-dev libboost-all-dev libminiupnpc-dev libdb-dev libdb4.8++ libdb5.3++-dev git -y
  • Compile and Install BerkeleyDB 4.8.30 by running the following commands:
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
sudo tar -xzvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
sudo ../dist/configure --enable-cxx
sudo make
sudo make install
export CPATH="/usr/local/BerkeleyDB.4.8/include"
export LIBRARY_PATH="/usr/local/BerkeleyDB.4.8/lib"

Note: the export commands are only valid in the current Terminal session. To avoid errors, don't close the Terminal until you fully completed with Bitcoin compilation.

  • Clone the Solarcoin Github, compile and install the client / node with following commands:
git clone https://github.com/onsightit/solarcoin.git
cd db-4.8.30.NC/build_unix
sudo ../dist/configure --prefix=/usr/local --enable-cxx
cd
cd solarcoin/src
sudo make -f makefile.unix
  • Start the daemon with:
./solarcoind
  • you may need to create a solarcoin.conf file
cd
cd .solarcoin
cat > solarcoin.conf

Enter the following

addnode=162.243.214.120
rpcuser=solarcoinrpc
rpcpassword=  *enter a secure password
listen=1   *if you want a fullnode
Hit CTRL+D to save the file
cd solarcoin/src
./solarcoind
  • To check if Solarcoin is running
./solarcoind getinfo

You should see info on the runnig node :)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Nice work fellas.

Well done telegram SolarCoin stakers! Now we can standardise the TXID for the first few transactions that the node makes. It allows the ElectriCChain to see what node swarms are operational.

It would be great to get some others with this running to confirm the process we wrote up

The next plan is to get some sort of repo on github with the headless client, then see if we can dockerize it or package it. Ideas welcomed.

An unofficial PPA would be great

This post has been linked to from another place on Steem.

Learn more about and upvote to support linkback bot v0.5. Flag this comment if you don't want the bot to continue posting linkbacks for your posts.

Built by @ontofractal

Muy bueno oye, thanks