美文网首页
fabric与windows(二)fabric环境

fabric与windows(二)fabric环境

作者: ccDown | 来源:发表于2019-10-13 23:30 被阅读0次

1.安装go
2.下载fabric源码
3.启动fabric-samples
4.安装make命令

1.安装go、git

安装go并设置GOPATH

安装git并设置以下命令

git config --global core.autocrlf false
git config --global core.longpaths true

2.下载fabric源码

cd到GOPATH/src/github.com/hyperledger目录下,执行

cd GOPATH/src/github.com/hyperledger
git clone https://github.com/hyperledger/fabric.git

之后切换版本,并执行scripts文件夹下的bootstrap.sh脚本获取fabric-samples

git checkout v1.4.3
cd GOPATH/src/github.com/hyperledger/fabric/scripts
##下载fabric-samples  这个过程相当缓慢
./scripts/bootstrap.sh

3.启动fabric-samples

进入到下载的fabric-samples目录下开始跑一下官方的例子

cd scripts/fabric-samples/first-network
##生成通道
./byfn.sh -m generate -c mychannel
##通道
./byfn.sh -m up -c mychannel
##查看启动的镜像
docker images
##关闭网络
./byfn.sh -m down

4.windows环境没有make命令,需要下载mingw-get-setup


记得使用git bash的命令行,windows的cmd和powershell太难用了

算了,放弃win了,一堆坑,Linux的还是强大

相关文章

网友评论

      本文标题:fabric与windows(二)fabric环境

      本文链接:https://www.haomeiwen.com/subject/cmehmctx.html