windows 10 fabric环境搭建

1、安装docker

windows版本的docker已经集成了docker-compose

直接双击打开 InstallDocker

   删除docker:请参考http://www.cnblogs.com/PigeonNoir/articles/9265247.html

2、拉取镜像

  打开cmd 输入命令 :docker pull hyperledger/fabric-peer:X86_64-1.0.0

                                    docker pull hyperledger/fabric-tools:X86_64-1.0.0

                                    docker pull hyperledger/fabric-orderer:X86_64-1.0.0

                                    docker pull hyperledger/fabric-ca:X86_64-1.0.0

                                    docker pull hyperledger/fabric-baseos:X86_64-0.4.6

                                    docker pull hyperledger/fabric-peer:latest

                                    docker pull hyperledger/fabric-tools:latest

                                    docker pull hyperledger/fabric-orderer:latest

                                    docker pull hyperledger/fabric-ca:latest

                                    docker pull hyperledger/fabric-baseos:latest

3、下载fabric源码

    此步需要安装minGW和git

    安装minGW : https://jingyan.baidu.com/album/656db918c1d832e381249c3e.html?picindex=11

    安装git : https://www.cnblogs.com/ximiaomiao/p/7140456.html

4、下载源码

    打开git Bash

   输入命令:

   进入 cd $GOPATH/src/github.com/hyperledger目录

   执行命令

    git clone https://github.com/hyperledger/fabric

    git clone https://github.com/hyperledger/fabric-samples

5、编译cryptogen和configtxgen工具

   首先切换到1.0版本  git checkout release-1.0

   5.1 cryptogen

   进入 src/github.com/hyperledger/fabric/common/tools/ cryptogen

   执行命令 go install --tags=nopkcs11

   进入 src/github.com/hyperledger/fabric/common/configtx/tool/configtxgen

   执行命令 go install --tags=nopkcs11

   进入目录 $GOPATH/bin使用命令ll查看是否编译成功

6、开始搭链

   进入目录src/github.com/hyperledger/fabric-samples

   cd first-network

   ./byfn.sh -h 查看命令

   ./byfn.sh -m generate -c imocc(通道的名字,可以任意取名)

   查看配置文件

 

  

你可能感兴趣的:(blockchain)