"Aadhi Manivannan (author): I worked in the protocol lab for 6 months and now I am not working there."
For months, I have been staring at my Raspberry PI (RPI) and I don't know how to make it useful. I have three RPIs, they are all there, and they are full of dust.
- Explore the Huaqiang North Bitcoin mining machine rivers and lakes: the blockchain is not good enough to "save the city".
- Jimmy Song: Bitcoin doesn't need marketing, too many experts are pushing for scams.
- Finance, passwords, communication, science fiction circles gathered, the world blockchain conference • Wuzhen second batch of guests exposed!
- Li Lin: 5G, Internet of Things, AI and blockchain will become the new accelerators of the digital economy
- Under the circumstance of Wuzhen policy, the blockchain investment tells you, where is the opportunity?
- How does blockchain change the banking industry? A complete overview of the blockchain path of state-owned banks
When I first bought it, they were all useful. One is a smart camera, the other is for playing LEDs, and the other is my personal server. However, RPIs are dusty as their initial use is used.
So, I think I should bring them to use. That's why I decided to make one of my RPIs an IPFS node. Also, I want to try IPFS-Cluster (IPFS cluster). Although the installation process is largely simple, there are some problems.
This is why this article appeared. To save time for those who want to run their own RPI as an IPFS node, and as an analysis of how to make the IPFS cluster run "insight".
Before starting, this guide will not cover how to start RPI using Raspbian, as there are many guides today that do this. You will need to complete those operations before trying the rest of this guide.
As a reference, I used Raspbian Buster Lite (CLI) on my installation. In order to put the image on the SD card, I used an etcher.
Before you start, you will also need to download Golang. Once Raspbian is up and running, this is a simple installation. Use the following to install Go on your RPI terminal:
Sudo apt update sudo apt install golang
After the download is complete, you need to set GOPATH. In my setup, I created a "go" directory in the $HOME directory (aka ~/) and set it to my GOPATH:
Cd ~/ mkdir go echo 'export GOPATH=$HOME/go' >> ~/.profile echo 'PATH="$HOME/go/bin:$PATH"' >> ~/. profile source ~/.profile
Finally, you want to make sure that Git is also installed on your system:
Sudo apt install git
You should check Go and Git quickly:
Go version git version
If they all return output with version details, then that's fine.
At this point, you should have completed all necessary installations. Let's take a look at the good things.
To install IPFS, I don't actually recommend using their documentation. RPI is an ARM device (at the time of this writing) and there may be unreliable interactions. The most memorable solution I found was the ipfs-rpi repo created by claudiobizzotto.
First cloning the repo and changing to the directory:
Cd ~/ git clone https://github.com/claudiobizzotto/ipfs-rpi.git cd ipfs-rpi
Now you can install IPFS using the installation scripts in the directory:
After the installation is complete, you can use the following software to check if IPFS is installed correctly:
Installing IPFS-Cluster To install IPFS-Cluster, I recommend starting with the source code. First cloning ipfs-cluster repo and changing it to a directory:
Cd ~/ git clone https://github.com/ipfs/ipfs-cluster.git cd ipfs-cluster
Now you need to run two scripts:
Go install ./cmd/ipfs-cluster-service go install ./cmd/ipfs-cluster-ctl
It is expected to take a while for the first time. This is due to the large number of dependencies. The second one should be installed faster. Once both are installed, check all the work:
Ipfs-cluster-service version ipfs-cluster-ctl version
Now you are the owner of the RPI node with IPFS (& cluster!) enabled.
What's next? Here, it is recommended to read the "Getting Started" section on IPFS and IPFS-cluster. The easiest way is to run the IPFS daemon (ipfs damon) and get the RPI on the network. With just one line of code, you can get into DWeb, which is very cool.
However, what's really interesting is how to use both IPFS (CDN) and IPFS-cluster (coordinator).
Interestingly: I am currently using these two tools to create a simple note taking application. You can continue to pay attention to more details!
– Complete the text –
This article is compiled by the IPFS Force Zone, the original link: https://aadhi.rocks/installing-ipfs-ipfs-cluster-on-raspberry-pi/