参考文档:https://github.com/hyperledger/blockchain-explorer
1、环境要求
- nodejs 8.11.x(nodejs 9.x不支持)
- Postgresql 9.5以及更新版本
sudo apt update
sudo apt install postgresql postgresql-contrib
- Jq ubuntu安装
sudo apt-get install jq
2、Clone 仓库
cd ~/go/src/github.com/hyperledger/
git clone https://github.com/hyperledger/blockchain-explorer.git
cd blockchain-explorer
git checkout v0.3.9.5
3、数据库设置
cd blockchain-explorer/app
更改explorerconfig.json更新postgresql属性(默认即可,不需要更改)
"postgreSQL": {
"host": "127.0.0.1",
"port": "5432",
"database": "fabricexplorer",
"username": "hppoc",
"passwd": "password"
}
执行创建数据库脚本
cd blockchain-explorer/app/persistence/fabric/postgreSQL/db
./createdb.sh
如果提示permission denied,那么更改/root文件夹权限
chmod +x /root
4、启动Fabric Network
参考