安装文档:http://www.cnblogs.com/studyzy/p/7437157.html
安装上面的文档安装成功,但是过程中遇到一些问题。
一、go的源码包可能下载不下来,因为被墙,go官方提供了以下的安装方式,可以直接apt安装golang-1.9
$ sudo add-apt-repository ppa:gophers/archive
$ sudo apt update
$ sudo apt-get install golang-1.9-go
Note that golang-1.9-go puts binaries in /usr/lib/go-1.9/bin. If you want them on your PATH, you need to make that change yourself.
参考链接:https://github.com/golang/go/wiki/Ubuntu
二. 遇到这样的问题: "transport: Error while dialing dial tcp: lookup peer1.org1.example.com on 127.0.0.11:53: no such host"; 解决方案:
Try this workaround:
edit the generateArtifacts.sh to change the name of the generated genesis.block file to be orderer.genesis.block
in the base/docker-compose-base.yaml modify the line:
../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
to
../channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block
参考连接:https://www.questarter.com/q/fabric-v1-orderer-container-stops-with-panic-error-27_44135041.html
三. 如果安装步骤有问题,启动./network_setup.sh up时报错,解决问题后,要先make clean,再尝试安装,但是clean会删除我们下载好的docker镜像,这不是我们想要的,所以需要修改hyperledger/fabric/MakeFile 将第403行-docker images -q $(DOCKER_NS)/fabric-$(TARGET) | xargs -I '{}' docker rmi -f '{}'
注释掉。然后使用下面的命令清理掉这台server上的所有容器:
docker ps -a|awk '{print $1}'|xargs -i docker stop {}
docker ps -a|awk '{print $1}'|xargs -i docker rm {}