Compiling the Phore wallet on Raspberry Pi

in #phore7 years ago (edited)

PHR Raspberry Pi Guide by NoxX (v1.1, 16 Dec 17)

Requirements:

  • Raspberry PI (tested with Pi 3 and Pi Zero W, but should work with others as well)
  • 8GB (micro) SD card
  • (micro) SD card reader
  • USB power supply
  • Mouse, Keyboard and Screen for the initial setup

Optional:

  • Static IP, if you want to run a Masternode on your Pi
  • USB Stick, if you want to go easy on the SD card

Installation:

  1. Download Raspbian Stretch from here: https://www.raspberrypi.org/downloads/raspbian/

  2. Unzip, and use USB Image Tool or another SD imaging tool to copy Raspbian to the SD card

  3. Plug the SD card, Mouse, Keyboard and Screen into the RasPi and boot it

  4. Open a terminal and change the default password for the user Pi and for root with sudo passwd pi NEWPASSWORD and sudo passwd root NEWPASSWORD

  5. Connect to your WiFi or wired internet connection

  6. Click on the Start icon and under Preferences -> Raspberry Pi Configuration -> Interfaces enable SSH, and if you want to use a remote desktop, enable VNC as well

  7. Reboot the Pi. You can now use the Pi remotely via SSH or VNC, or you can continue to use the local keyboard and screen.

  8. Install the prerequisites for compiling the wallet with sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl1.0-dev libboost-all-dev libevent-dev

  9. If you want to have the QT wallet (graphical interface), also install these prerequisites: sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler

  10. Optional: If you want Universal Plug N Play enabled, install **sudo apt-get install libminiupnpc-dev **

  11. Optional: If you want QR code encoding enabled, install sudo apt-get install libqrencode-dev

  12. Install Berkeley DB 4.8:
    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

  13. Download the PHR source with git clone https://github.com/phoreproject/Phore, navigate to cd Phore

  14. Run chmod +x autogen.sh share/genbuild.sh src/leveldb/build_detect_platform, then ./autogen.sh

  15. Run ./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib/" CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include/"

  16. Run make

  17. Run sudo make install

Note that the RasPi is not a very powerful computer, so the last few steps will take a while (1 hour or more)

You now have a shiny new Phore daemon, client and (optionally) QT wallet in /usr/local/bin

  • Set execute permissions on those files and copy or move them to a more convenient location (e.g. desktop)
  • Plug in the USB stick
  • Run the daemon with **./phored -datadir=”/media/pi/YOUR_USBSTICK_NAME/”** or the QT wallet with ./phore-qt -datadir=”/media/pi/YOUR_USBSTICK_NAME/”

This will make sure the blockchain files and wallet.dat are saved to the USB stick, and not the SD card itself, making SD card corruption less likely

If you are running the daemon only, check the status with ./phore-cli -datadir=”/media/pi/YOUR_USBSTICK_NAME/” getinfo

This will show you information on your wallet and how far along the blockchain sync is. Check with the PHR blockchain explorer what the current block height is and wait until your daemon is fully synced.

You can use an existing wallet.dat and copy it to the RasPi USB stick, or send your PHR to the new wallet on the RasPi.

Once your coins are there and the blockchain is synced, unlock the wallet for staking with ./phore-cli -datadir=”/media/pi/YOUR_USBSTICK_NAME/” walletpassphrase YOUR_PASSPHRASE 9999999999 true

This will unlock the wallet for staking only for 9999999999 seconds. After a few minutes run ./phore-cli -datadir=”/media/pi/YOUR_USBSTICK_NAME/” getinfo should show “staking active”

If you run into any trouble, post a question in the bitcointalk thread

https://bitcointalk.org/index.php?topic=2307909.420

or DM me https://bitcointalk.org/index.php?action=pm;sa=send;u=311420

If this guide helped you, PHR donations are welcome ;)

PJauPFL4GZwsm9j8ugjHj6QqgUqL8WZM94

Sort:  

Congratulations @noxx! You received a personal award!

1 Year on Steemit

Click here to view your Board of Honor

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @noxx! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!