Skip to content

Instantly share code, notes, and snippets.

@stiucsib86
Last active June 4, 2018 07:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stiucsib86/553330e6bb8bd88ecdcce49bd1dc1d65 to your computer and use it in GitHub Desktop.
Save stiucsib86/553330e6bb8bd88ecdcce49bd1dc1d65 to your computer and use it in GitHub Desktop.
#!/bin/bash
# To run script
# 1. in background which immune to hangups (meaning you can exit terminal safely),
# 2. and write output to "nohup.out" file
#
# nohup ./deeponion-raspberry-pi.sh &
# Prerequisite: Install required tools
sudo apt-get install build-essential libtool autotools-dev autoconf automake pkg-config libssl-dev libboost-all-dev bsdmainutils libqrencode-dev libminiupnpc-dev libevent-dev libcap-dev libseccomp-dev git libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
# Clone the latest version and checkout raspberry branch
# git clone --recursive https://github.com/stiucsib86/deeponion.git
git clone --recursive https://github.com/deeponion/deeponion.git
cd deeponion
git checkout raspberry
# Prepare directory & paths
ONION_ROOT=$(pwd)
BDB_PREFIX="${ONION_ROOT}/db4"
mkdir -p $BDB_PREFIX
# Fetch the sources
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
# Check the sources. The below command must return db-4.8.30.NC.tar.gz: OK
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c
# Unpack the sources
tar -xzvf db-4.8.30.NC.tar.gz
# Build the library and install to our prefix
cd db-4.8.30.NC/build_unix/
# Do a static build so that it can be embedded into the executable
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install
# Configure DeepOnion to use our own-built instance of BDB
cd $ONION_ROOT
./autogen.sh
./configure --disable-tests --without-gui LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/"
# ./configure --disable-tests --with-gui=qt5 LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/"
# (if you want to build daemon, use --without-gui)
# Fixes "msse2" and "mstackrealign" error
cd $ONION_ROOT
sed -i 's/-msse2 -mstackrealign//g' src/Makefile
# Clone OpenSSL v1.1.0-stable sources from GitHub and checkout the 1.1.0-stable version
git clone https://github.com/openssl/openssl.git
cd openssl
git checkout OpenSSL_1_1_0-stable
./config
make depend
make
sudo make install
# Finally, go back to your deeponion source-root directory and execute the build process by entering make
cd $ONION_ROOT
make clean
make
# Copy DeepOnion Daemon to Home folder
cp src/DeepOniond ~/DeepOniond
# Run DeepOnion Daemon
cd ~
./DeepOniond
# Configure the DeepOnion wallet
# mkdir ~/.DeepOnion
# cd ~/.DeepOnion
# touch DeepOnion.conf
# Paste following contents into the configuration textfile DeepOnion.conf with the nano editor by the command:
# nano ~/.DeepOnion/DeepOnion.conf but replace the node addresses with recent ones from
# https://deeponion.org/DeepOnion.conf.php
#
# testnet=0
# listen=1
# server=1
# daemon=1
# maxconnections=90
# rpcuser=yourIrrelevantUsername
# rpcpassword=yourIrrelevantPassword
# rpcport=18580
# rpcconnect=127.0.0.1
# rpcallowip=127.0.0.1
#
# addnode=2zqbi35cuxaa5hdv.onion:17570
# addnode=qwutsfqfiszhzny5.onion:17570
# addnode=l6ntc2e6fzbj3o2i.onion:17570
# addnode=zixupfklnbyoxgnh.onion:17570
#
@stiucsib86
Copy link
Author

Updated DeepOnion repo to official repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment