fabric blockchain-explorer安装

 

  1. 版本v1.0.0-rc1 https://github.com/hyperledger/blockchain-explorer/archive/v1.0.0-rc1.tar.gz
  2. nodejs8.11.x
  3. jq sudo apt install jq
  4. docker 18.09.2+
  5. docker compose 1.14.0
  6. PostgreSQL 9.5+ sudo apt-get install postgresql
  7. cd /etc/postgresql/9.5/main
  8. sudo vim pg_hba.conf

host all all 0.0.0.0/0 trust

local all all trust

  1. sudo vim postgresql.conf

listen_addresses = '*'

  1. systemctl restart postgresql-9.5.service
  2. systemctl status postgresql-9.5.service
  3. cd blockchain-explorer/app/persistence/fabric/postgreSQL
  4. chmod -R 775 db/
  5. cd blockchain-explorer/app/persistence/fabric/postgreSQL/db
  6. sudo -u postgres ./createdb.sh
  7. 配置first-network启动的docker配置文件fabric-samples/first-network/base/docker-compose-base.yaml 。添加红色部分,让explorer能够发现网络拓扑

orderer.example.com:

container_name: orderer.example.com

image: hyperledger/fabric-orderer:$IMAGE_TAG

environment:

- ORDERER_OPERATIONS_LISTENADDRESS=0.0.0.0:8443 # operation RESTful API

- ORDERER_METRICS_PROVIDER=prometheus # prometheus will pull metrics from orderer via /metrics RESTful API

ports:

- 7050:7050

- 8443:8443 # Operation REST

 

peer0.org1.example.com:

container_name: peer0.org1.example.com

extends:

file: peer-base.yaml

service: peer-base

environment:

- CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9443 # operation RESTful API

- CORE_METRICS_PROVIDER=prometheus # prometheus will pull metrics from orderer via /metrics RESTful API

ports:

- 7051:7051

- 7053:7053

- 9443:9443

 

peer1.org1.example.com:

container_name: peer1.org1.example.com

extends:

file: peer-base.yaml

service: peer-base

environment:

- CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9444 # operation RESTful API

- CORE_METRICS_PROVIDER=prometheus # prometheus will pull metrics from orderer via /metrics RESTful API

ports:

- 8051:7051

- 8053:7053

- 9444:9444

 

peer0.org2.example.com:

container_name: peer0.org2.example.com

extends:

file: peer-base.yaml

service: peer-base

environment:

- CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9445 # operation RESTful API

- CORE_METRICS_PROVIDER=prometheus # prometheus will pull metrics from orderer via /metrics RESTful API

ports:

- 9051:7051

- 9053:7053

- 9445:9445

 

peer1.org2.example.com:

container_name: peer1.org2.example.com

extends:

file: peer-base.yaml

service: peer-base

environment:

- CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9446 # operation RESTful API

- CORE_METRICS_PROVIDER=prometheus # prometheus will pull metrics from orderer via /metrics RESTful API

ports:

- 10051:7051

- 10053:7053

- 9446:9446

  1. 修改 /blockchain-explorer/app/platform/fabric/connection-profile/first-network.json 中的密钥/fabric-path/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/ 有节点发现机制不用全配
  2. 里面的账号密码是CA的账号密码,在配置完登录界面时用
  3. blockchain-explorer/app/platform/fabric/config.json可以修改网络的名字和配置文件路径
  4. cd blockchain-explorer
  5. cnpm install
  6. cd blockchain-explorer/app/test
  7. cnpm install
  8. npm run test (有错误不要紧,是由于一个脚本的pgsql的账号密码没写对,不用管)
  9. cd blockchain-explorer/client
  10. cnpm install
  11. npm run test:ci -- -u --coverage
  12. npm run build
  13. cd blockchain-explorer/
  14. ./start.sh
  15. http://localhost:8080
  16. ./stop.sh

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sbfmjscs

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值