树莓派3上的Hyperledger织物 [英] Hyperledger Fabric on Raspberry pi 3
问题描述
我正在尝试在树莓派上部署超级账本结构,但是它不起作用.我在寻找一些教程,但我没有找到它,有人做过吗?
I'm trying to deploy hyperledger fabric on a raspberry pi, but it doesn't work. I'm searching for some tutorial but i didn't found it, there are someone that just did it?
推荐答案
上次我尝试在RPi上运行Hyperledger Fabric我已经按照以下说明进行了准备:
Last time I've tried to run Hyperledger Fabric on RPi I've prepared following instructions:
- 在SD卡上安装最新的RASPBIAN,您可以从以下位置下载映像: https://www.raspberrypi.org/downloads/raspbian/
-
通过运行以下命令来更新和升级最新版本:
- Install latest RASPBIAN on SD card, you can download image from: https://www.raspberrypi.org/downloads/raspbian/
Update and upgrade latest by running:
sudo apt-get update && sudo apt-get upgrade -y
安装必需的依赖项:
Install required dependencies:
sudo apt-get install git curl gcc libc6-dev libltdl3-dev python-setuptools -y
升级python pip安装程序:
Upgrade python pip installer:
sudo -H pip install pip --upgrade
安装docker和docker compose:
Install docker and docker compose:
curl -sSL get.docker.com | shsudo usermod -aG docker pisudo pip install docker-compose
注销/登录终端会话,因此更改将生效.
Logout/Login terminal session, so changes will take effect.
按照以下说明安装Golang: https://golang.org/doc/install
Install golang, by following instructions from: https://golang.org/doc/install
创建golang目录:
Create golang directory:
mkdir -p /home/pi/golang && mkdir -p /home/pi/golang/src/github/hyperledger/
定义环境变量
Define environment variable
export GOPATH=/home/pi/golang
确保go二进制文件在路径中,例如:
Make sure go binaries are in the path, e.g.:
export PATH=/usr/local/go/bin:$PATH
将fabric-baseimage存储库克隆到/home/pi/golang/src/github/hyperledger/
git clone https://github.com/hyperledger/fabric-baseimage.git
将客户端结构存储库克隆到/home/pi/golang/src/github/hyperledger/
git clone https://github.com/hyperledger/fabric.git
基于构建的docker映像
Build based docker images
cd ~/golang/src/github/hyperledger/fabric-baseimage && make docker-local
将以下补丁应用到结构代码库:
Apply following patch to fabric code base:
--- a/peer/core.yaml
+++ b/peer/core.yaml
@@ -68,7 +68,6 @@ peer:
# Gossip related configuration
gossip:
- bootstrap: 127.0.0.1:7051
# Use automatically chosen peer (high avalibility) to distribute blocks in channel or static one
# Setting this true and orgLeader true cause panic exit
useLeaderElection: false
@@ -280,7 +279,7 @@ vm:
Config:
max-size: "50m"
max-file: "5"
- Memory: 2147483648
+ Memory: 16777216
AND
--- a/core/container/util/dockerutil.go
+++ b/core/container/util/dockerutil.go
@@ -45,6 +45,7 @@ func NewDockerClient() (client *docker.Client, err error) {
// and GOARCH here.
var archRemap = map[string]string{
"amd64": "x86_64",
+ "arm": "armv7l",
}
func getArch() string {
构建Hyperledger对等方和
Build Hyperledger peer and
cd ~/golang/src/github/hyperledger/fabric && make clean peer peer-docker
对等可执行程序二进制文件将出现在以下位置:
Peer executable binary will appear in:
~/golang/src/github/hyperledger/fabric/build/bin/
这篇关于树莓派3上的Hyperledger织物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!