diff --git a/cryptocurrencies/Installing_bitcoind_on_raspberry_pi.html b/cryptocurrencies/Installing_bitcoind_on_raspberry_pi.html new file mode 100644 index 0000000..29d25f6 --- /dev/null +++ b/cryptocurrencies/Installing_bitcoind_on_raspberry_pi.html @@ -0,0 +1,335 @@ + + + + + + + + + + + + + Installing bitcoind on raspberry pi - Cryptocurrencies + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+

+ Installing bitcoind on raspberry pi +

+ +
+
+

Installing bitcoind on linux

+

Running a full bitcoin node helps the bitcoin network to accept, validate and relay transactions. If you want to volunteer some spare computing and bandwidth resources to run a full node and allow Bitcoin to continue to grow you can grab an inexpensive and power efficient raspberry pi and turn it into a full node.

+

There are plenty of tutorials on the Internet explaining how to install a bitcoin full node; this tutorial won't go over setting up a raspberry pi and using ssh.

+

In order to store the full blockchain we will mount a network drive and tell bitcoind to use this mapped drive as the data directory.

+

Download the bitcoin client

+

Go to https://bitcoin.org/en/download

+

png

+

Copy the URL for the ARM 32 bit version and download it onto your raspberry pi.

+
wget https://bitcoin.org/bin/bitcoin-core-0.15.1/bitcoin-0.15.1-arm-linux-gnueabihf.tar.gz
+
+ + +

Locate the downloaded file and extract it using the arguement xzf

+
tar xzf bitcoin-0.15.1-arm-linux-gnueabihf.tar.gz
+
+ + +

a new directory bitcoin-0.15.1 will be created, it contrains the files we need to install the software

+

Install the bitcoin client

+

We will install the content by copying the binaries located in the bin folder into /usr/local/bin by using the install command. +You must use sudo because it will write data to a system directory

+
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-0.15.1/bin/*
+
+ + +

Launch the bitcoin core client by running

+
bitcoind -daemon
+
+ + +

Configuration of the node

+

Start your node at boot

+

Starting you node automatically at boot time is a good idea because it doesn't require a manual action from the user. The simplest way to achive this is to create a cronjob.

+

Run the following command

+
crontab -e
+
+ + +

Select the text editor of your choice, then add the following line at the end of the file

+
@reboot bitcoind -daemon
+
+ + +

Save the file and exit; the updated crontab file will be installed for you.

+

Full Node

+

If you can afford to download and store all the blockchain, you can run a full node. At the time of writing, the blockchain is 150Go (https://blockchain.info/fr/charts/blocks-size). Tree ways to store this are : + use a microSD with 256Go or more + add a thumbdrive or an external drive to your raspberry pi +* mount a network drive from a NAS

+

If you have purchased a big SD card then you can leave the default location for the blockchain data (~/.bitcoin/). +Otherwise, you will have to change the datadir location to where your drive is mounted (in my case I have mounted it to /mnt)

+

In order to configure your bitcoin client, edit/create the file bitcoin.conf located in ~/.bitcoin/

+
nano ~/.bitcoin/bitcoin.conf
+
+ + +

copy the following text

+
# From redoules.github.io
+
+# This config should be placed in following path:
+# ~/.bitcoin/bitcoin.conf
+
+# [core]
+# Specify a non-default location to store blockchain and other data.
+datadir=/mnt
+# Set database cache size in megabytes; machines sync faster with a larger cache. Recommend setting as high as possible based upon mach$
+dbcache=100
+# Keep at most <n> unconnectable transactions in memory.
+maxorphantx=10
+# Keep the transaction memory pool below <n> megabytess.
+maxmempool=50
+
+# [network]
+# Maintain at most N connections to peers.
+maxconnections=40
+# Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit.
+maxuploadtarget=5000
+
+ + +

Check https://jlopp.github.io/bitcoin-core-config-generator it is a handy site to edit the bitcoin.conf file

+

Pruning node

+

If you don't want to store the entire blockchain you can run a pruning node which reduces storage requirements by enabling pruning (deleting) of old blocks.

+

Let's say you want to allocated at most 5Go to the blockchain, then specify prune=5000 into your bitcoin.conf file. Edit/create the file bitcoin.conf located in ~/.bitcoin/

+
nano ~/.bitcoin/bitcoin.conf
+
+ + +

copy the following text

+
# From redoules.github.io
+
+# This config should be placed in following path:
+# ~/.bitcoin/bitcoin.conf
+
+# [core]
+# Set database cache size in megabytes; machines sync faster with a larger cache. Recommend setting as high as possible based upon mach$
+dbcache=100
+# Keep at most <n> unconnectable transactions in memory.
+maxorphantx=10
+# Keep the transaction memory pool below <n> megabytess.
+maxmempool=50
+# Reduce storage requirements by only storing most recent N MiB of block. This mode is incompatible with -txindex and -rescan. WARNING: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, greater than 550 = automatically prune blocks to stay under target size in MiB).
+prune=5000
+
+# [network]
+# Maintain at most N connections to peers.
+maxconnections=40
+# Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit.
+maxuploadtarget=5000
+
+ + +

Checking if your node is public

+

one of the best way to help the bitcoin network is to allow your node to be visible and to propagate block to other nodes.

+

The bitcoin protocole uses port 8333, other clients should be able to share information with your client.

+

Run

+
ifconfig
+
+ + +

and check if you have an ipv6 adresse (look for adr inet6:)

+

IPV6

+

Get the global ipv6 adresse of your raspberry pi

+
          Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
+          inet adr:192.168.1.x  Bcast:192.168.1.255  Masque:255.255.255.0
+          adr inet6: xxxx::xxxx:xxxx:xxxx:xxxx/64 Scope:Lien
+          adr inet6: xxxx:xxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64 Scope:Global
+          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
+          RX packets:42681744 errors:0 dropped:0 overruns:0 frame:0
+          TX packets:38447218 errors:0 dropped:0 overruns:0 carrier:0
+          collisions:0 lg file transmission:1000
+          RX bytes:3044414780 (2.8 GiB)  TX bytes:2599878680 (2.4 GiB)
+
+ + +

it is located between adr inet4 and Scope:Global

+
adr inet6: xxxx:xxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64 Scope:Global
+
+ + +

Copy this adresse and past it into the search field on https://bitnodes.earn.com/

+

jpg

+

If your node is visible, it will appear on the website

+

jpg

+

IPV4

+

If you don't have an ipv6 adresse, you will have to open port 8333 on your router and redirect it to the internal IP of your raspberry pi.

+

It is not detailed here because the configuration depends on your router.

+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/Installing_bitcoind_on_raspberry_pi/1.png b/images/Installing_bitcoind_on_raspberry_pi/1.png new file mode 100644 index 0000000..d78635e Binary files /dev/null and b/images/Installing_bitcoind_on_raspberry_pi/1.png differ diff --git a/images/Installing_bitcoind_on_raspberry_pi/2.JPG b/images/Installing_bitcoind_on_raspberry_pi/2.JPG new file mode 100644 index 0000000..02c54da Binary files /dev/null and b/images/Installing_bitcoind_on_raspberry_pi/2.JPG differ diff --git a/images/Installing_bitcoind_on_raspberry_pi/3.JPG b/images/Installing_bitcoind_on_raspberry_pi/3.JPG new file mode 100644 index 0000000..c7aea31 Binary files /dev/null and b/images/Installing_bitcoind_on_raspberry_pi/3.JPG differ diff --git a/images/share_nfs_share/1.jpg b/images/share_nfs_share/1.jpg new file mode 100644 index 0000000..9b7bb3a Binary files /dev/null and b/images/share_nfs_share/1.jpg differ diff --git a/images/share_nfs_share/2.jpg b/images/share_nfs_share/2.jpg new file mode 100644 index 0000000..8f3f71d Binary files /dev/null and b/images/share_nfs_share/2.jpg differ diff --git a/images/share_nfs_share/3.jpg b/images/share_nfs_share/3.jpg new file mode 100644 index 0000000..9b4a5d5 Binary files /dev/null and b/images/share_nfs_share/3.jpg differ diff --git a/images/share_nfs_share/4.jpg b/images/share_nfs_share/4.jpg new file mode 100644 index 0000000..6d1e101 Binary files /dev/null and b/images/share_nfs_share/4.jpg differ diff --git a/images/share_nfs_share/5.jpg b/images/share_nfs_share/5.jpg new file mode 100644 index 0000000..ff8697d Binary files /dev/null and b/images/share_nfs_share/5.jpg differ diff --git a/index.html b/index.html index 752c889..ae4d07e 100644 --- a/index.html +++ b/index.html @@ -345,16 +345,75 @@ -
+ +
-

Bash

+

Cryptocurrencies

+
+
+
+

Forks/airdrops

+
+
+
    +
  • Coming soon.
  • +
+
+
+
+
+ +
+
+

Linux

+
+
+
+
+

Bash

+
+ +
+
+
+
+
+

Raspberry pi

+
+ +
+
+ +
+
+
+

Synology

+
+
@@ -399,7 +458,7 @@