`
lxiaodao
  • 浏览: 119807 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Fabric Samples安装记录

阅读更多
尝试安装Fabric和Fabric Samples,体验fabric方案的情况
环境:CentOS 7.2,目录在root下
一、安装docker
curl -fsSL https://get.docker.com/ | sh
上面这个命令安装最新的docker版本。
二、docker-compose安装记录
1.安装Docker命令
curl -fsSL https://get.docker.com/ | sh

2.安装docker-compose命令

curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

3.授权可执行
chmod +x /usr/local/bin/docker-compose

三、克隆源代码
https://github.com/hyperledger/fabric-samples

/root/fabric-samples

执行下面命令下载fabric二进制可执行程序和docker image包
fabric-samples]# ./scripts/bootstrap.sh

安装完毕fabric-samples目录下多了bin目录
完成后执行命令docker images检查各个包具备。
四、运行first-network
cd first-network
执行命令
./byfn.sh generate
,生成证书和各种配置文件,包含创世区块的配置。
./byfn.sh up 运行起来相应镜像,整个networ运行起来。
Querying chaincode on peer1.org2...
===================== Querying on peer1.org2 on channel 'mychannel'... ===================== 
+ peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'
Attempting to Query peer1.org2 ...3 secs
+ res=0
+ set +x

90
===================== Query successful on peer1.org2 on channel 'mychannel' ===================== 

========= All GOOD, BYFN execution completed =========== 


 _____   _   _   ____   
| ____| | \ | | |  _ \  
|  _|   |  \| | | | | | 
| |___  | |\  | | |_| | 
|_____| |_| \_| |____/  


最后看到上面的信息,表面运行成功。
如果要重新运行,./byfn.sh down先停掉。
五、另外说一下在阿里云机上的验证过程:
目录/root/fabric-samples/first-network

环境:centos7.2
Linux izwz9eq8l3k3xh805ynp3xz 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

在阿里云主机上执行上述过程,报错
error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded
试了很多方法都不行,没有找到原因。
换在内网服务器上,操作系统都是centos7.2,一路顺利成功。
看来云主机上面的环境还有与物理主机操作系统环境有重要的区别。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics