此代码库修改自https://github.com/hyperledger/fabric-samples
下面以运行环境为ubuntu16.04为例,简述fabric-samples的安装流程:
依赖工具:node(v6.11.0或以上),npm(3.10.10或以上)以,golang(1.8或以上)要求设置GOPATH, docker(17.09.0-ce或以上),docker-compose(1.17或以上)。
i. 下载本代码库 cd $GOPATH/src git clone https://github.com/LordGoodman/fabric-samples.git
ii. 下载Fabric常用工具集 cd ~/Downloads $ curl https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/linux-amd64-1.0.0/hyperledger-fabric-linux-amd64-1.0.0.tar.gz | tar xz
iii. 把工具集加入到PATH环境变量中 echo 'export PATH=$PATH:$HOME/Downloads/bin' >> ~/.profile source ~/.profile
iv. 下载Fabric的docker镜像 cd $GOPATH/src/fabric-samples/scripts && bash fabric-preload.sh