Jump to content
Sign in to follow this  
buzzkillb

Compile PI3 denarius daemon binary [Raspbian]

Recommended Posts

How to compile denariusd daemon on Raspberry Pi3 in Raspbian and run TOR.

Headless Install (enable wifi and enable ssh)
https://desertbot.io/blog/headless-raspberry-pi-3-bplus-ssh-wifi-setup

Swap Space (Required for Compiling)
https://www.bitpi.co/2015/02/11/how-to-change-raspberry-pis-swapfile-size-on-rasbian/

sudo sed -i 's/CONF_SWAPSIZE=100/CONF_SWAPSIZE=2048/' /etc/dphys-swapfile
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start
free -m

On dependencies read a few posts below if you want to compile and use berkeley database 4.8 to keep backwards compatibility.

sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt-get --assume-yes install git unzip build-essential libdb++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev libgmp-dev libevent-dev autogen automake libtool

Compile and replace openssl to openssl 1.0.1j. (may or may not be required) I need to double check if there was 1 more step to this or not to make sure openssl is right.

apt-get install make
wget https://www.openssl.org/source/openssl-1.0.1j.tar.gz
tar -xzvf openssl-1.0.1j.tar.gz
cd openssl-1.0.1j
./config
make depend
make
#make test
make install
sudo ln -sf /usr/local/ssl/bin/openssl `which openssl
cd ~
openssl version -v

Git clone v3.4 branch to get v3.3.8.

git clone https://github.com/carsenk/denarius
cd denarius
git checkout v3.4
git pull
cd src
OPENSSL_INCLUDE_PATH=/usr/local/ssl/include OPENSSL_LIB_PATH=/usr/local/ssl/lib make -f makefile.arm
strip denariusd
sudo cp denariusd /usr/local/bin/denariusd

#Use Chaindata

cd ~
mkdir ~/.denarius
wget https://github.com/carsenk/denarius/releases/download/v3.3.6/chaindata1612994.zip
unzip chaindata1612994.zip

#Install TOR service

sudo apt-get install tor
sudo nano /etc/tor/torrc

Find this line and change the 2
#HiddenServiceDir /var/lib/tor/hidden_service/
#HiddenServicePort 80 127.0.0.1:80

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 33369 127.0.0.1:33369

sudo service tor restart

#To get onion address

sudo cat /var/lib/tor/hidden_service/hostname

example from above
favlp6mro3bh5jnt.onion

#sample TOR and clearnet denarius.conf

rpcuser=denariusrpc
rpcpassword=STRONGPASSWORD
rpcallowip=127.0.0.1
daemon=1
tor=127.0.0.1:9050
listen=1
externalip=favlp6mro3bh5jnt.onion
discover=1

 

  • Like 1

Join Denarius Discord - https://discord.gg/JQEmXwb

Share this post


Link to post
Share on other sites

Mental Note

Iif you want to use berkeley db 4.8 to always be backwards compatible. Instead of sudo apt-get install libdb++-dev, do this

mkdir ~/Downloads
cd ~/Downloads
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
make
sudo make install

 

  • Like 1

Join Denarius Discord - https://discord.gg/JQEmXwb

Share this post


Link to post
Share on other sites

soiboi 👻 keeps saying cross compile, trying to figure that out from ubuntu 18.04 to arm

#make and install openssl arm

cd openssl-1.0.1j
make clean
./Configure linux-elf no-asm shared --prefix=/usr --openssldir=ssl --cross-compile-prefix=arm-linux-gnueabihf-
make install INSTALL_PREFIX=~/openssl/armlib

#that will install libs into ~/openssl/armlib/usr/lib
#headers into ~/openssl/armlib/usr/include/openssl
#and arm-binary executable into ~/openssl/armlib/usr/bin

OPENSSL_INCLUDE_PATH=~/openssl/armlib/usr/include OPENSSL_LIB_PATH=~/openssl/armlib/usr/lib make CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ -f makefile.arm

 


Join Denarius Discord - https://discord.gg/JQEmXwb

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...