fabric:建立第一个网络

搭建环境

安装curl、docker、docker-compose、go。

注意:将当前用户加入docker组以避免执行命令时重复输入sudo

sudo gpasswd -a ${USER} docker

配置GO

vi ~/.bash_profile

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOROOT/bin:$PATH

部署示例代码

mkdir -p $GOPATH/src/github.com/hyperledger
cd $GOPATH/src/github.com/hyperledger

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

curl -sSL https://goo.gl/Gci9ZX | bash
或
wget https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap-1.0.2.sh
sudo bash bootstrap-1.0.2.sh

Build Your First Network

cd first-network
./byfn.sh -h
./byfn.sh -m generate
./byfn.sh -m up
./byfn.sh -m down

参考文章:http://hyperledger-fabric.readthedocs.io/en/release/build_network.html

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享