Fabric 1.0环境搭建
安装Docker
apt-get update
apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
- 验证
apt-key fingerprint 0EBFCD88
##安装Docker CE
```apt-get update```
![](https://images2018.cnblogs.com/blog/1027040/201807/1027040-20180714081601576-212329955.png)
add-apt-repository \
"deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-get install docker-ce
验证
docker run hello-world
授予用户权限
usermod -aG docker root
安装docker-compose
curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
加执行权限
chmod +x /usr/local/bin/docker-compose
3、安装Go
wget http://mirrors.ustc.edu.cn/golang/go1.10.2.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.10.2.linux-amd64.tar.gz
编辑 ~/.profile
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$HOME/go/bin
source ~/.profile
创建go目录
mkdir ~/go
拉取fabric源码
创建目录
mkdir -p ~/go/src/github.com/hyperledger
切换到该目录
cd ~/go/src/github.com/hyperledger
克隆fabric代码
git clone https://github.com/hyperledger/fabric.git
进入到fabric目录
cd ~/go/src/github.com/hyperledger/fabric
切换到1.0版本
git checkout v1.0.0
进入到e2e_cli目录
cd ~/go/src/github.com/hyperledger/fabric/examples/e2e_cli/
下载Docker镜像
source download-dockerimages.sh -c x86_64-1.0.0 -f x86_64-1.0.0
启动e2e_cli网络
./network_setup.sh up