cd ~/go/src/github.com/hyperledger/fabric git checkout v1.0.0
3.2 Fabric Docker镜像的下载
下载
1 2
cd ~/go/src/github.com/hyperledger/fabric/examples/e2e_cli/ source download-dockerimages.sh -c x86_64-1.0.0 -f x86_64-1.0.0
下载完毕后,检查下载的镜像列表:
1
执行命令:docker images
4、编译cryptogen
编译生成 cryptogen之前我们需要安装一个软件包,否则编译时会报错
1
apt install libtool libltdl3-dev
Fabric提供了专门编译cryptogen的入口,我们只需要运行以下命令即可:
1 2
cd ~/go/src/github.com/hyperledger/fabric make cryptogen
运行后系统返回如下结果即代表编译成功了
1 2 3
build/bin/cryptogen CGO_CFLAGS=" " GOBIN=/home/studyzy/go/src/github.com/hyperledger/fabric/build/bin go install -tags "" -ldflags "-X github.com/hyperledger/fabric/common/tools/cryptogen/metadata.Version=1.0.0" github.com/hyperledger/fabric/common/tools/cryptogen Binary available as build/bin/cryptogen
5 、修改文件运行区块链
切换路径
1
cd ~/go/src/github.com/hyperledger/fabric/examples/e2e_cli
修改 ~/etc/resolv.conf 配置
1
vim ~/etc/resolv.conf
将 options ** 内容注释掉,作者修改后的内容如下
1 2 3 4
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN 127.0.0.1 # options timeout:2 attempts:3 rotate single-request-reopen
Be the first person to leave a comment!