Hyperledger Fabric 1.0 实战学习(二) fabric-explorer搭建

     fabric-explorer能查看到区块的信息,比如交易、区块、节点,部署的链码情况等,所以建议在网络搭建成功之后,可以尝试部署一下fabric-explorer。
1、下载支持mysql版本的fabric-explorer(目前支持的数据库有mysql和postgre,因为本机有mysql环境所以安装mysql的版本)
git clone https://github.com/hyperledger/blockchain-explorer.git
cd blockchain-explorer
git checkout reactbranch
npm install

2、mysql脚本导入
路径:/opt/gopath/src/github.com/hyperledger/blockchain-explorer/db/fabricexplorer.sql

脚本导入成功之后会自动建好用户和表。
修改网络配置和数据库配置信息:

vim config.json:

3、启动first-network:
cd /opt/gopath/src/github.com/hyperledger/fabric-samples/first-network
./byfn.sh up
4、启动blockchain-explorer
cd /opt/gopath/src/github.com/hyperledger/blockchain-explorer
./start.sh
浏览器访问http://locaohost:8080
目前博客更新可能有点慢,欢迎大家邮件进行技术交流。
邮件:[email protected]

猜你喜欢

转载自blog.csdn.net/lilindawan1/article/details/80725767