ubuntu18.04|ubuntu18.04 Fabric配置

【ubuntu18.04|ubuntu18.04 Fabric配置】首先建好存放源码的文件夹路径如下:

mkdir –p ~/go/src/github.com/hyperledger cd ~/go/src/github.com/hyperledger

ubuntu18.04|ubuntu18.04 Fabric配置
文章图片

用git命令下载完整源码
git clone https://github.com/hyperledger/fabric.git

ubuntu18.04|ubuntu18.04 Fabric配置
文章图片

切换版本:
cd ~/go/src/github.com/hyperledger/fabric 进入fabric目录 git checkout v1.0.0

ubuntu18.04|ubuntu18.04 Fabric配置
文章图片

Fabric源码基本搞定。
接下来是Fabric Docker镜像的下载
之前我们已经设置了Docker Hub镜像地址,所以下载也会很快。运行指令
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

(这个要挺久的,建议把息屏锁屏什么的关掉,慢慢等待,息屏之后有几率卡住,前功尽弃!)
ubuntu18.04|ubuntu18.04 Fabric配置
文章图片

下载完毕后,界面如图:
ubuntu18.04|ubuntu18.04 Fabric配置
文章图片

我们运行以下命令检查下载的镜像列表:
docker images

ubuntu18.04|ubuntu18.04 Fabric配置
文章图片

然后可以测试一下Fabric:
./network_setup.sh up

成功的截图:
ubuntu18.04|ubuntu18.04 Fabric配置
文章图片

记得退出时命令:
./network_setup.sh down

不这样操作可能会报错。如果大家也在学习Fabric,希望对你有一些帮助!

    推荐阅读