export PATH=<path to download location>/bin:$PATH
安装完毕
三、示例
1、安装git
yum install git
2、获取fabric-samples代码
git clone https://github.com/hyperledger/fabric-samples.git
cd fabric-samples
3、在目录fabric-samples中建立子目录 first-network
mkdir first-network
cd fabric-network
在first-network中增加byfn.sh文件
./byfn.sh -h
Usage:
byfn.sh -m up|down|restart|generate [-c <channel name>] [-t <timeout>]
byfn.sh -h|--help (print this message)
-m <mode> - one of 'up', 'down', 'restart' or 'generate'
- 'up' - bring up the network with docker-compose up
- 'down' - clear the network with docker-compose down
- 'restart' - restart the network
- 'generate' - generate required certificates and genesis block
-c <channel name> - config name to use (defaults to "mychannel")
-t <timeout> - CLI timeout duration in microseconds (defaults to 10000)
Typically, one would first generate the required certificates and
genesis block, then bring up the network. e.g.:
byfn.sh -m generate -c <channelname>
byfn.sh -m up -c <channelname>
这里直接使用first-samples自代示例直接运行