Hyperledger Fabric 搭建

1.准备环境:

安装docker、git、go、curl

 2. 安装fabric

安装参考:https://hyperledger-fabric.readthedocs.io/en/latest/install.html

2.1.拉fabric源码(也可以不下载源码,直接下载https : //raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh 脚本

 # git clone "https://gerrit.hyperledger.org/r/fabric"

克隆下了后,目录大概就是这些内容:

 查看下bootstrap.sh 脚本,会下载Binaries 和 Docker Images。

 下载失败。

 可以自己找个比较快的地址额外下载:https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/

将需要的版本地址配置在脚本bootstrap.sh中

增加 NEW_URL=https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/linux-amd64-1.4.4/

将原来的配置屏蔽

#download "${BINARY_FILE}" "https://github.com/hyperledger/fabric/releases/download/v${VERSION}/${BINARY_FILE}"

新增:

download "${BINARY_FILE}" "${NEW_URL}/${BINARY_FILE}"

配置截图如下:

 然后执行脚本:

 根据bootstrap.sh 脚本中默认的版本,打开官网(https://hub.docker.com/r/hyperledger/),可以提前下载好镜像。

本次下载的镜像                                                                              

docker pull hyperledger/fabric-peer:1.4                         peer模块镜像文件

docker pull hyperledger/fabric-tools:1.4                        相关工具镜像文件,包含了cryptogen、configtxgen、configtxlator等工具

docker pull hyperledger/fabric-orderer:1.4                    orderer节点库镜像文件

docker pull hyperledger/fabric-ca:1.4                            ca模块镜像文件

docker pull hyperledger/fabric-baseos:0.4.18 基础镜像文件,其他镜像文件在该镜像文件的基础上生成 docker pull hyperledger/fabric-kafka:0.4.18 kafka库镜像文件 docker pull hyperledger/fabric-zookeeper:0.4.18 zookeeper库镜像文件 docker pull hyperledger/fabric-couchdb:0.4.18 couchdb数据库镜像文件 docker pull hyperledger/fabric-baseimage:0.4.18 基础镜像文件包含了jdk、golang、nodejs等,可以用来生成chaincode 

猜你喜欢

转载自www.cnblogs.com/zoujiaojiao/p/11995921.html