Hyperledger-explorer 部署在Fabric 1.1( mac )

部署环境:

fabric1.1
macOS 10.13.4
git 2.15.2
node v8.11.3
npm v6.1
1.配置fabric 基础环境(略)
2.启动网络


cd /Users/yunlong/go/src/github.com/hyperledger/fabric-samples/first-network
./byfn.sh -m up

启动成功得样子

这里写图片描述

3.找到fabric 配置文件路径(复制)

这里写图片描述

本机:/Users/yunlong/go/src/github.com/hyperledger/fabric-samples/first-network/crypto-config
4.克隆源码,进入源码目录下
https://github.com/hyperledger/blockchain-explorer.git
cd blockchain-explorer
5.安装postgreSQL 数据库
brew install PostgreSQL
配置环境变量

![这里写图片描述](https://img-blog.csdn.net/20180710151043915?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3UwMTM3MzczMzY=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)
6.链接数据库
psql postgres

这里写图片描述

7.执行创建数据库
\i app/persistance/postgreSQL/db/explorerpg.sql
\i app/persistance/postgreSQL/db/updatepg.sql
8.查看创建数据库
\l view created fabricexplorer database
\d view created tables
9.配置数据库

文件路径如图所示(app/persistance/postgreSQL/db/pgconfig.json)

这里写图片描述
(注意:可先命令行测试链接数据库是否成功,psql postgres://hppoc:password@127.0.0.1:5432/fabricexplorer)

10.将图中标出路径本文件全部替换为 第3步 的路径

这里写图片描述

11.另起来一个终端 build hyperledger explorer(部分不成功,可全局代理)
  1. cd blockchain-explorer
  2. npm install
  3. cd blockchain-explorer/app/test
  4. npm install
  5. npm run test
  6. cd client/
  7. npm install
  8. npm test -- -u --coverage
  9. npm run build
12.启动区块浏览器
cd  blockchain-explorer
node main.js

这里写图片描述

13.打开chrome 访问:http://localhost:8080/

这里写图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值