Fabric环境搭建

栏目: 编程工具 · 发布时间: 7年前

内容简介:2018-10-27笔记花了一天搭建的环境。重开一个终端,两个一次

2018-10-27笔记

花了一天搭建的环境。

  1. 首先安装依赖
$ sudo apt update
$ sudo apt install -y libsnappy-def zlib1g-dev libbz2-dev libltdl-dev libtool
  1. 搭建 go 环境 ,并且安装 /maxbrunsfeld/counterfeitergolang/tools
  2. 搭建docker ,并且安装 docker-compose
  3. 安装 chaintool
$ cd /usr/local/bin
$ sudo wget https://github.com/hyperledger/fabric-chaintool/releases/download/v0.10.3/chaintool
$ chmod +x chaintool
  1. 下载 fabricfabric-ca 源码
$ mkdir -p $GOPATH/src/github.com/hyperledger
$ cd $GOPATH/src/github.com/hyperledger
$ git clone --single-branch -b master --depth 1 https://github.com/hyperledger/fabric.git
$ git clone --single-branch -b master --depth 1 https://github.com/hyperledger/fabric-ca.git
  1. 安装 protoc-gen-go (使用 go get 或者 git clone + go install
$ go get -u github.com/golang/protobuf/protoc-gen-go
$ cd $GOPATH/src/github.com/hyperledger/fabric
$ mkdir -p .build/docker/gotools/bin/
$ ln -s $GOPATH/bin/protoc-gen-go  $PWD/.build/docker/gotools/bin/
  1. 制作 docker 镜像
$ cd $GOPATH/src/github.com/hyperledger/fabric-ca
$ make docker

重开一个终端,两个一次 make ,节省时间

$ cd $GOPATH/src/github.com/hyperledger/fabric
$ make docker  # !!特别久!!

至此环境搭建完毕了,整理完后,回头看搭建过程其实也没有那么复杂了。主要是解决了 go get 不稳定时候的问题,然后还有 docker 的国内镜像加速。


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Usability for the Web

Usability for the Web

Tom Brinck、Darren Gergle、Scott D. Wood / Morgan Kaufmann / 2001-10-15 / USD 65.95

Every stage in the design of a new web site is an opportunity to meet or miss deadlines and budgetary goals. Every stage is an opportunity to boost or undercut the site's usability. Thi......一起来看看 《Usability for the Web》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换