Hyperlegder Fabric监控:blockchain-explorer

一、blockchain-explorer3.4版本的前提条件:
(1)nodejs 8.11.x (Note that v9.x is not yet supported)
(2)PostgreSQL 9.5 or greater
(3)docker 17.06.2-ce
(4)docker-compose 1.14.0
分别进行满足:
1、nodejs 8.11.3安装
将node-v8.11.3-linux-x64.tar.gz下载到/home/wang路径下后,执行:

wang@wang:~$ wget https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x64.tar.xz
wang@wang:~$ tar -xvf node-v8.11.3-linux-x64.tar.xz 
//建立软链
wang@wang:~$ ln -s /home/wang/node-v8.11.3-linux-x64/bin/node /usr/local/bin/node
wang@wang:~$ ln -s /home/wang/node-v8.11.3-linux-x64/bin/npm /usr/local/bin/npm
//查看是否安装成功
wang@wang:~$ node -v
v8.11.3
wang@wang:~$ npm -v
5.6.0

2、PostgreSQL安装
直接执行下列命令即可,下载下来的直接就是 9.5.x 版本符合要求。

wang@wang:~$ sudo apt-get install postgresql

查看下版本:

wang@wang:~$ psql --version
psql (PostgreSQL) 9.5.14

3、docker 17.06.2-ce
先卸载再安装:

wang@wang:~$ docker version
Client:
 Version:      1.13.1
 API version:  1.26
 Go version:   go1.6.2
 Git commit:   092cba3
 Built:        Thu Nov  2 20:40:23 2017
 OS/Arch:      linux/amd64

Server:
 Version:      1.13.1
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.6.2
 Git commit:   092cba3
 Built:        Thu Nov  2 20:40:23 2017
 OS/Arch:      linux/amd64
 Experimental: false
wang@wang:~$ docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 20
Server Version: 1.13.1
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 139
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version:  (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: N/A (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-116-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.842 GiB
Name: wang
ID: N5BF:DEMD:3HFO:LCHM:UPR7:OAGB:R7J6:K2A7:GUNR:HVIR:HFNT:ITCR
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
 127.0.0.0/8
Registry Mirrors:
 https://registry.docker-cn.com
Live Restore Enabled: false
//卸载
wang@wang:~$ sudo apt-get remove docker docker-engine docker.io
[sudo] password for wang: 
Sorry, try again.
[sudo] password for wang: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'docker' is not installed, so not removed
Package 'docker-engine' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  bridge-utils cgroupfs-mount containerd runc ubuntu-fan
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  docker.io
0 upgraded, 0 newly installed, 1 to remove and 347 not upgraded.
After this operation, 62.7 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 244991 files and directories currently installed.)
Removing docker.io (1.13.1-0ubuntu1~16.04.2) ...
'/usr/share/docker.io/contrib/nuke-graph-directory.sh' -> '/var/lib/docker/nuke-graph-directory.sh'
Processing triggers for man-db (2.7.5-1) ...
W: Duplicate sources.list entry http://cn.archive.ubuntu.com/ubuntu xenial-updates Release
wang@wang:~$ docker info
bash: /usr/bin/docker: No such file or directory
//安装
wang@wang:~$ sudo apt-get install docker-ce=17.06.2~ce-0~ubuntu
wang@wang:~$ docker version
Client:
 Version:      17.06.2-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   cec0b72
 Built:        Tue Sep  5 20:00:17 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.06.2-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   cec0b72
 Built:        Tue Sep  5 19:59:11 2017
 OS/Arch:      linux/amd64
 Experimental: false

4、docker-compose 1.14.0

wang@wang:~$ curl -L https://get.daocloud.io/docker/compose/releases/download/1.14.0/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   423  100   423    0     0   1675      0 --:--:-- --:--:-- --:--:--  1678
100 8084k  100 8084k    0     0   769k      0  0:00:10  0:00:10 --:--:--  974k
wang@wang:~$ sudo mv ~/docker-compose /usr/local/bin/docker-compose 
wang@wang:~$ chmod +x /usr/local/bin/docker-compose
wang@wang:~$ docker-compose -v
docker-compose version 1.14.0, build c7bdf9e

至此,前提条件已经全部满足。

二、下载项目源码并切换到3.4版本:

wang@wang:~/go/src/github.com/hyperledger$ git clone https://github.com/hyperledger/blockchain-explorer.git
Cloning into 'blockchain-explorer'...
remote: Enumerating objects: 5849, done.
remote: Total 5849 (delta 0), reused 0 (delta 0), pack-reused 5849
Receiving objects: 100% (5849/5849), 137.97 MiB | 230.00 KiB/s, done.
Resolving deltas: 100% (3269/3269), done.
Checking connectivity... done.
//切换到3.4
wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer$ git checkout release-3.4
Branch release-3.4 set up to track remote branch release-3.4 from origin.
Switched to a new branch 'release-3.4'
wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer$ git branch -a
  master
* release-3.4
  remotes/origin/HEAD -> origin/master
  remotes/origin/code-formatting
  remotes/origin/development
  remotes/origin/discovery
  remotes/origin/fab-1.2-integration
  remotes/origin/master
  remotes/origin/react
  remotes/origin/reactbranch
  remotes/origin/rearchitects-react
  remotes/origin/reducks
  remotes/origin/release-3
  remotes/origin/release-3.1
  remotes/origin/release-3.2
  remotes/origin/release-3.3
  remotes/origin/release-3.4
  remotes/origin/release-3.5
  remotes/origin/release-3.6
  remotes/origin/release-3.7
  remotes/origin/release-3.8

三、数据库初始化
sudo -u postgres psql //连接PosgreSQL database
\i app/persistence/postgreSQL/db/explorerpg.sql
\i app/persistence/postgreSQL/db/updatepg.sql //执行数据库脚本

wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer$ sudo -u postgres psql
psql (9.5.14)
Type "help" for help.

postgres=# \i app/persistence/postgreSQL/db/explorerpg.sql
CREATE ROLE
psql:app/persistence/postgreSQL/db/explorerpg.sql:6: NOTICE:  database "fabricexplorer" does not exist, skipping
DROP DATABASE
CREATE DATABASE
You are now connected to database "fabricexplorer" as user "postgres".
psql:app/persistence/postgreSQL/db/explorerpg.sql:14: NOTICE:  table "blocks" does not exist, skipping
DROP TABLE
CREATE TABLE
ALTER TABLE
psql:app/persistence/postgreSQL/db/explorerpg.sql:31: NOTICE:  table "chaincodes" does not exist, skipping
DROP TABLE
CREATE TABLE
ALTER TABLE
ALTER SEQUENCE
psql:app/persistence/postgreSQL/db/explorerpg.sql:48: NOTICE:  table "channel" does not exist, skipping
DROP TABLE
CREATE TABLE
ALTER TABLE
ALTER SEQUENCE
psql:app/persistence/postgreSQL/db/explorerpg.sql:65: NOTICE:  table "peer" does not exist, skipping
DROP TABLE
CREATE TABLE
ALTER TABLE
psql:app/persistence/postgreSQL/db/explorerpg.sql:83: NOTICE:  table "peer_ref_channel" does not exist, skipping
DROP TABLE
CREATE TABLE
ALTER TABLE
psql:app/persistence/postgreSQL/db/explorerpg.sql:97: NOTICE:  table "orderer" does not exist, skipping
DROP TABLE
CREATE TABLE
ALTER TABLE
psql:app/persistence/postgreSQL/db/explorerpg.sql:113: NOTICE:  table "transaction" does not exist, skipping
DROP TABLE
CREATE TABLE
ALTER TABLE
ALTER SEQUENCE
psql:app/persistence/postgreSQL/db/explorerpg.sql:126: NOTICE:  table "write_lock" does not exist, skipping
DROP TABLE
CREATE TABLE
ALTER TABLE
ALTER SEQUENCE
GRANT
fabricexplorer=# \i app/persistence/postgreSQL/db/updatepg.sql
You are now connected to database "fabricexplorer" as user "postgres".
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
psql:app/persistence/postgreSQL/db/updatepg.sql:46: NOTICE:  index "blocks_blocknum_idx" does not exist, skipping
DROP INDEX
CREATE INDEX
psql:app/persistence/postgreSQL/db/updatepg.sql:49: NOTICE:  index "blocks_genesis_block_hash_idx" does not exist, skipping
DROP INDEX
CREATE INDEX
psql:app/persistence/postgreSQL/db/updatepg.sql:52: NOTICE:  index "blocks_createdt_idx" does not exist, skipping
DROP INDEX
CREATE INDEX
psql:app/persistence/postgreSQL/db/updatepg.sql:55: NOTICE:  index "transaction_txhash_idx" does not exist, skipping
DROP INDEX
CREATE INDEX
psql:app/persistence/postgreSQL/db/updatepg.sql:58: NOTICE:  index "transaction_genesis_block_hash_idx" does not exist, skipping
DROP INDEX
CREATE INDEX
psql:app/persistence/postgreSQL/db/updatepg.sql:61: NOTICE:  index "transaction_createdt_idx" does not exist, skipping
DROP INDEX
CREATE INDEX
psql:app/persistence/postgreSQL/db/updatepg.sql:64: NOTICE:  index "transaction_blockid_idx" does not exist, skipping
DROP INDEX
CREATE INDEX
psql:app/persistence/postgreSQL/db/updatepg.sql:67: NOTICE:  index "transaction_chaincode_proposal_input_idx" does not exist, skipping
DROP INDEX
CREATE INDEX
psql:app/persistence/postgreSQL/db/updatepg.sql:70: NOTICE:  index "channel_genesis_block_hash_idx" does not exist, skipping
DROP INDEX
CREATE INDEX
psql:app/persistence/postgreSQL/db/updatepg.sql:73: NOTICE:  index "channel_channel_hash_idx" does not exist, skipping
DROP INDEX
CREATE INDEX
ALTER TABLE
fabricexplorer=# 

四、运行一个fabric1.1网络
1、下载fabric和fabric-samples并都切换版本至1.1:

wang@wang:~/go/src/github.com/hyperledger$ git clone https://github.com/hyperledger/fabric-samples.git
Cloning into 'fabric-samples'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 2275 (delta 0), reused 6 (delta 0), pack-reused 2268
Receiving objects: 100% (2275/2275), 805.80 KiB | 286.00 KiB/s, done.
Resolving deltas: 100% (1112/1112), done.
Checking connectivity... done.
wang@wang:~/go/src/github.com/hyperledger/fabric-samples$ git checkout release-1.1
Branch release-1.1 set up to track remote branch release-1.1 from origin.
Switched to a new branch 'release-1.1'
wang@wang:~/go/src/github.com/hyperledger/fabric-samples$ git branch -a
* release-1.1
  release-1.3
  remotes/origin/HEAD -> origin/release-1.3
  remotes/origin/master
  remotes/origin/release
  remotes/origin/release-1.0
  remotes/origin/release-1.1
  remotes/origin/release-1.2
  remotes/origin/release-1.3
wang@wang:~/go/src/github.com/hyperledger$ git clone https://github.com/hyperledger/fabric.git
Cloning into 'fabric'...
remote: Enumerating objects: 146, done.
remote: Counting objects: 100% (146/146), done.
remote: Compressing objects: 100% (124/124), done.
remote: Total 84253 (delta 55), reused 102 (delta 12), pack-reused 84107
Receiving objects: 100% (84253/84253), 80.94 MiB | 729.00 KiB/s, done.
Resolving deltas: 100% (54106/54106), done.
Checking connectivity... done.
wang@wang:~/go/src/github.com/hyperledger/fabric$ git checkout release-1.1
Branch release-1.1 set up to track remote branch release-1.1 from origin.
Switched to a new branch 'release-1.1'
wang@wang:~/go/src/github.com/hyperledger/fabric$ git branch -a
* release-1.1
  release-1.4
  remotes/origin/HEAD -> origin/release-1.4
  remotes/origin/feature/ca
  remotes/origin/feature/convergence
  remotes/origin/master
  remotes/origin/release-1.0
  remotes/origin/release-1.1
  remotes/origin/release-1.2
  remotes/origin/release-1.3
  remotes/origin/release-1.4
  remotes/origin/v0.6
  remotes/origin/v1.0.0-preview

2、下载要执行的二进制文件和对应版本的镜像:

wang@wang:~/go/src/github.com/hyperledger/fabric/scripts$ ./bootstrap.sh 
===> Downloading platform specific fabric binaries
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 35.4M  100 35.4M    0     0  99205      0  0:06:14  0:06:14 --:--:-- 47786
===> Downloading platform specific fabric-ca-client binary
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6109k  100 6109k    0     0  97362      0  0:01:04  0:01:04 --:--:--  129k
===> Pulling fabric Images
==> FABRIC IMAGE: peer

x86_64-1.1.0: Pulling from hyperledger/fabric-peer
1be7f2b886e8: Pull complete 
6fbc4a21b806: Pull complete 
c71a6f8e1378: Pull complete 
4be3072e5a37: Pull complete 
06c6d2f59700: Pull complete 
4d536120d8a5: Pull complete 
0baaf9ec263e: Pull complete 
770563795186: Pull complete 
15763b7bd14b: Pull complete 
62f2823da7f3: Pull complete 
Digest: sha256:57417699ddf50c5ebd47a9a2cc74c0324fbba0281eb1104b9ddd05a67776b01f
Status: Downloaded newer image for hyperledger/fabric-peer:x86_64-1.1.0
==> FABRIC IMAGE: orderer

x86_64-1.1.0: Pulling from hyperledger/fabric-orderer
1be7f2b886e8: Already exists 
6fbc4a21b806: Already exists 
c71a6f8e1378: Already exists 
4be3072e5a37: Already exists 
06c6d2f59700: Already exists 
4d536120d8a5: Already exists 
0baaf9ec263e: Already exists 
770563795186: Already exists 
61d33418a569: Pull complete 
b1b98004e7c6: Pull complete 
Digest: sha256:0c3a3b5ecfd24b513da22bbb77da7b3f5bca9c121cc0ac5c46ba04c97c163654
Status: Downloaded newer image for hyperledger/fabric-orderer:x86_64-1.1.0
==> FABRIC IMAGE: ccenv

x86_64-1.1.0: Pulling from hyperledger/fabric-ccenv
1be7f2b886e8: Already exists 
6fbc4a21b806: Already exists 
c71a6f8e1378: Already exists 
4be3072e5a37: Already exists 
06c6d2f59700: Already exists 
4d536120d8a5: Already exists 
0baaf9ec263e: Already exists 
3ea9b6cc6f21: Pull complete 
6173b9a5fe5e: Pull complete 
e73719e0bcbe: Pull complete 
b55408c6ced5: Pull complete 
e1267c65ed62: Pull complete 
2839c20999d1: Pull complete 
444429f2833f: Pull complete 
Digest: sha256:07818367dc6d4264472d24b21819f9dc4e16e890d81ddfacee0341a22d72050b
Status: Downloaded newer image for hyperledger/fabric-ccenv:x86_64-1.1.0
==> FABRIC IMAGE: javaenv

x86_64-1.1.0: Pulling from hyperledger/fabric-javaenv
1be7f2b886e8: Already exists 
6fbc4a21b806: Already exists 
c71a6f8e1378: Already exists 
4be3072e5a37: Already exists 
06c6d2f59700: Already exists 
4d536120d8a5: Already exists 
0baaf9ec263e: Already exists 
3ea9b6cc6f21: Already exists 
6173b9a5fe5e: Already exists 
e73719e0bcbe: Already exists 
b55408c6ced5: Already exists 
d72e92165d22: Pull complete 
bbb7025c0883: Pull complete 
8fa39f27c772: Pull complete 
5187f67cb3f8: Pull complete 
05488c815030: Pull complete 
3bd91626e779: Pull complete 
47aa3719a5d6: Pull complete 
cd3dc7bf95ff: Pull complete 
Digest: sha256:d2588c0556b6fc79131f638b02a7a77337363e2c2f38a9c47798a6d99bd2f20e
Status: Downloaded newer image for hyperledger/fabric-javaenv:x86_64-1.1.0
==> FABRIC IMAGE: tools

x86_64-1.1.0: Pulling from hyperledger/fabric-tools
1be7f2b886e8: Already exists 
6fbc4a21b806: Already exists 
c71a6f8e1378: Already exists 
4be3072e5a37: Already exists 
06c6d2f59700: Already exists 
4d536120d8a5: Already exists 
0baaf9ec263e: Already exists 
3ea9b6cc6f21: Already exists 
6173b9a5fe5e: Already exists 
e73719e0bcbe: Already exists 
b55408c6ced5: Already exists 
1a8bca84adfa: Pull complete 
b54c1992cc9c: Pull complete 
68093aff3e84: Pull complete 
3827dc0ff46d: Pull complete 
1e22360bf4e7: Pull complete 
Digest: sha256:36d7fa8e8ddcc19fed8e1c3c06bc6ae1dac18c35e8a884188d2c08df3e5a4472
Status: Downloaded newer image for hyperledger/fabric-tools:x86_64-1.1.0
===> Pulling fabric ca Image
==> FABRIC CA IMAGE

x86_64-1.1.0: Pulling from hyperledger/fabric-ca
1be7f2b886e8: Already exists 
6fbc4a21b806: Already exists 
c71a6f8e1378: Already exists 
4be3072e5a37: Already exists 
06c6d2f59700: Already exists 
4d536120d8a5: Already exists 
0baaf9ec263e: Already exists 
ab27f0b1192c: Pull complete 
7e1142a727eb: Pull complete 
a7624c188c44: Pull complete 
0c8524afd242: Pull complete 
23e14758f709: Pull complete 
Digest: sha256:92f44d0811cddb0d335f7879f7e3b3c4b631f31740c76f3e7b85438c244b03f4
Status: Downloaded newer image for hyperledger/fabric-ca:x86_64-1.1.0
===> Pulling thirdparty docker images
==> THIRDPARTY DOCKER IMAGE: couchdb

x86_64-0.4.6: Pulling from hyperledger/fabric-couchdb
8f7c85c2269a: Pull complete 
9e72e494a6dd: Pull complete 
3009ec50c887: Pull complete 
9d5ffccbec91: Pull complete 
e872a2642ce1: Pull complete 
9b84958a26b3: Pull complete 
68d4ced7ec19: Pull complete 
ff1d2b44d88d: Pull complete 
99e6a41c35bd: Pull complete 
87b2e4a0b9d2: Pull complete 
55f108d3ee4a: Pull complete 
9e76f6c2c001: Pull complete 
368be4b23f81: Pull complete 
581042703e1f: Pull complete 
18c50435ee69: Pull complete 
70dbffc27ecb: Pull complete 
31c35dd1bd00: Pull complete 
7571e6af230f: Pull complete 
9ef1e88f8344: Pull complete 
Digest: sha256:4278269b115cfd0f24251b5381407be9ccdf396c1470c69e1ee2ff16917ac882
Status: Downloaded newer image for hyperledger/fabric-couchdb:x86_64-0.4.6
==> THIRDPARTY DOCKER IMAGE: kafka

x86_64-0.4.6: Pulling from hyperledger/fabric-kafka
8f7c85c2269a: Already exists 
9e72e494a6dd: Already exists 
3009ec50c887: Already exists 
9d5ffccbec91: Already exists 
e872a2642ce1: Already exists 
9b84958a26b3: Already exists 
68d4ced7ec19: Already exists 
ff1d2b44d88d: Already exists 
99e6a41c35bd: Already exists 
87b2e4a0b9d2: Already exists 
55f108d3ee4a: Already exists 
76d29739374b: Pull complete 
8e29d2dddc78: Pull complete 
6bb3eb1b6cb1: Pull complete 
Digest: sha256:738bb79f02aa505a9ab0553a865122605ffba91d1b5de6eb0429f7287e83ac7c
Status: Downloaded newer image for hyperledger/fabric-kafka:x86_64-0.4.6
==> THIRDPARTY DOCKER IMAGE: zookeeper

x86_64-0.4.6: Pulling from hyperledger/fabric-zookeeper
8f7c85c2269a: Already exists 
9e72e494a6dd: Already exists 
3009ec50c887: Already exists 
9d5ffccbec91: Already exists 
e872a2642ce1: Already exists 
9b84958a26b3: Already exists 
68d4ced7ec19: Already exists 
ff1d2b44d88d: Already exists 
99e6a41c35bd: Already exists 
87b2e4a0b9d2: Already exists 
55f108d3ee4a: Already exists 
f876628e022b: Pull complete 
5e8448f14014: Pull complete 
c1ddd9fcc9fe: Pull complete 
cae637096fa7: Pull complete 
Digest: sha256:7fda667f6c39d6cb87125c132962fc3e434a8e6b2b16ee798d6fa94f970531a2
Status: Downloaded newer image for hyperledger/fabric-zookeeper:x86_64-0.4.6

===> List out hyperledger docker images
hyperledger/fabric-zookeeper           <none>              d36da0db87a4        2 months ago        1.43 GB
hyperledger/fabric-kafka               <none>              a3b095201c66        2 months ago        1.44 GB
hyperledger/fabric-couchdb             <none>              f14f97292b4c        2 months ago        1.5 GB
hyperledger/fabric-javaenv             <none>              2476cefaf833        2 months ago        1.7 GB
hyperledger/fabric-ca                  <none>              5c6b20ba944f        2 months ago        244 MB
hyperledger/fabric-tools               <none>              c056cd9890e7        2 months ago        1.5 GB
hyperledger/fabric-ccenv               <none>              953124d80237        2 months ago        1.38 GB
hyperledger/fabric-orderer             <none>              f430f581b46b        2 months ago        145 MB
hyperledger/fabric-peer                <none>              f3ea63abddaa        2 months ago        151 MB
hyperledger/fabric-baseos              amd64-0.4.13        f0fe49196c40        2 months ago        124 MB
hyperledger/fabric-ca                  latest              72617b4fa9b4        9 months ago        299 MB
hyperledger/fabric-ca                  x86_64-1.1.0        72617b4fa9b4        9 months ago        299 MB
hyperledger/fabric-tools               latest              b7bfddf508bc        9 months ago        1.46 GB
hyperledger/fabric-tools               x86_64-1.1.0        b7bfddf508bc        9 months ago        1.46 GB
hyperledger/fabric-orderer             latest              ce0c810df36a        9 months ago        180 MB
hyperledger/fabric-orderer             x86_64-1.1.0        ce0c810df36a        9 months ago        180 MB
hyperledger/fabric-peer                latest              b023f9be0771        9 months ago        187 MB
hyperledger/fabric-peer                x86_64-1.1.0        b023f9be0771        9 months ago        187 MB
hyperledger/fabric-javaenv             latest              82098abb1a17        9 months ago        1.52 GB
hyperledger/fabric-javaenv             x86_64-1.1.0        82098abb1a17        9 months ago        1.52 GB
hyperledger/fabric-ccenv               latest              c8b4909d8d46        9 months ago        1.39 GB
hyperledger/fabric-ccenv               x86_64-1.1.0        c8b4909d8d46        9 months ago        1.39 GB
hyperledger/fabric-zookeeper           latest              92cbb952b6f8        9 months ago        1.39 GB
hyperledger/fabric-zookeeper           x86_64-0.4.6        92cbb952b6f8        9 months ago        1.39 GB
hyperledger/fabric-kafka               latest              554c591b86a8        9 months ago        1.4 GB
hyperledger/fabric-kafka               x86_64-0.4.6        554c591b86a8        9 months ago        1.4 GB
hyperledger/fabric-couchdb             latest              7e73c828fc5b        9 months ago        1.56 GB
hyperledger/fabric-couchdb             x86_64-0.4.6        7e73c828fc5b        9 months ago        1.56 GB

3、进入到fabric-samples文件下载1.1.0版本所需的二进制文件:

wang@wang:~/go/src/github.com/hyperledger/fabric-samples$ wget https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/linux-amd64-1.1.0/hyperledger-fabric-linux-amd64-1.1.0.tar.gz
打印:
--2018-12-12 13:59:54--  https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/linux-amd64-1.1.0/hyperledger-fabric-linux-amd64-1.1.0.tar.gz
Resolving nexus.hyperledger.org (nexus.hyperledger.org)... 199.19.212.106
Connecting to nexus.hyperledger.org (nexus.hyperledger.org)|199.19.212.106|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 37143247 (35M) [application/x-gzip]
Saving to: ‘hyperledger-fabric-linux-amd64-1.1.0.tar.gz’

hyperledger-fabric- 100%[===================>]  35.42M   227KB/s    in 3m 33s  

2018-12-12 14:03:30 (170 KB/s) - ‘hyperledger-fabric-linux-amd64-1.1.0.tar.gz’ saved [37143247/37143247]
wang@wang:~/go/src/github.com/hyperledger/fabric-samples$ ls
balance-transfer          high-throughput
basic-network             hyperledger-fabric-linux-amd64-1.1.0.tar.gz//
chaincode                 LICENSE
chaincode-docker-devmode  MAINTAINERS.md
fabcar                    README.md
fabric-ca                 scripts
first-network

4、解压下载的文件,会多出bin 和config两个文件夹:

wang@wang:~/go/src/github.com/hyperledger/fabric-samples$ tar -zxvf hyperledger-fabric-linux-amd64-1.1.0.tar.gz 
bin/
bin/get-docker-images.sh
bin/orderer
bin/peer
bin/configtxlator
bin/cryptogen
bin/configtxgen
config/
config/orderer.yaml
config/core.yaml
config/configtx.yaml
wang@wang:~/go/src/github.com/hyperledger/fabric-samples$ ls
balance-transfer          first-network
basic-network             high-throughput
bin                       hyperledger-fabric-linux-amd64-1.1.0.tar.gz
chaincode                 LICENSE
chaincode-docker-devmode  MAINTAINERS.md
config                    README.md
fabcar                    scripts
fabric-ca

5、把bin配置到环境变量:

wang@wang:~/go/src/github.com/hyperledger/fabric-samples/bin$ pwd
/home/wang/go/src/github.com/hyperledger/fabric-samples/bin
wang@wang:~/go/src/github.com/hyperledger/fabric-samples/bin$ vim /etc/profile
在profile中加入:
export PATH=/home/wang/go/src/github.com/hyperledger/fabric-samples/bin:$PATH

6、运行fabric1.1网络
cd fabric-samples/first-network/
下次运行之前先清理网络:

wang@wang:~/go/src/github.com/hyperledger/fabric-samples/first-network$ ./byfn.sh down

./byfn.sh -m generate //生成配置文件
./byfn.sh -m up //启动网络

wang@wang:~/go/src/github.com/hyperledger/fabric-samples/first-network$ ./byfn.sh -m generate
Generating certs and genesis block for with channel 'mychannel' and CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] Y
proceeding ...
/home/wang/go/src/github.com/hyperledger/fabric-samples/first-network/../bin/cryptogen

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
+ cryptogen generate --config=./crypto-config.yaml
org1.example.com
org2.example.com
+ res=0
+ set +x

/home/wang/go/src/github.com/hyperledger/fabric-samples/first-network/../bin/configtxgen
##########################################################
#########  Generating Orderer Genesis block ##############
##########################################################
+ configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
2018-12-12 16:35:08.339 CST [common/tools/configtxgen] main -> INFO 001 Loading configuration
2018-12-12 16:35:08.359 CST [msp] getMspConfig -> INFO 002 Loading NodeOUs
2018-12-12 16:35:08.360 CST [msp] getMspConfig -> INFO 003 Loading NodeOUs
2018-12-12 16:35:08.360 CST [common/tools/configtxgen] doOutputBlock -> INFO 004 Generating genesis block
2018-12-12 16:35:08.360 CST [common/tools/configtxgen] doOutputBlock -> INFO 005 Writing genesis block
+ res=0
+ set +x

#################################################################
### Generating channel configuration transaction 'channel.tx' ###
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID mychannel
2018-12-12 16:35:08.428 CST [common/tools/configtxgen] main -> INFO 001 Loading configuration
2018-12-12 16:35:08.437 CST [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
2018-12-12 16:35:08.438 CST [msp] getMspConfig -> INFO 003 Loading NodeOUs
2018-12-12 16:35:08.438 CST [msp] getMspConfig -> INFO 004 Loading NodeOUs
2018-12-12 16:35:08.466 CST [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 005 Writing new channel tx
+ res=0
+ set +x

#################################################################
#######    Generating anchor peer update for Org1MSP   ##########
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP
2018-12-12 16:35:08.542 CST [common/tools/configtxgen] main -> INFO 001 Loading configuration
2018-12-12 16:35:08.560 CST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2018-12-12 16:35:08.560 CST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update
+ res=0
+ set +x

#################################################################
#######    Generating anchor peer update for Org2MSP   ##########
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID mychannel -asOrg Org2MSP
2018-12-12 16:35:08.588 CST [common/tools/configtxgen] main -> INFO 001 Loading configuration
2018-12-12 16:35:08.602 CST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2018-12-12 16:35:08.603 CST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update
+ res=0
+ set +x
wang@wang:~/go/src/github.com/hyperledger/fabric-samples/first-network$ ./byfn.sh -m up
Starting with channel 'mychannel' and CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] Y

7、修改配置文件
(1)进入 blockchain-explorer/app/platform/fabric 这个路径,修改config.json文件修改一下配置文件中 “tls_cacerts”, “key”, “cert” 的路径,这个路径是你启动fabric 1.1 网络的绝对路径。或者将全部的“fabric-path”字样全部替换掉。

wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer/app/platform/fabric$ sudo gedit config.json 

替换后的路径前面类似如下格式:

"tls_cacerts":"/home/wang/go/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/xxx"

(2)再在 “channel”: "mychannel"下添加数据库的信息,由于我们直接通过PostgreSQL 命令生成的数据库数据表,用户名和密码都是自带默认的,不需要我们修改。详情可见 explorerpg.sql。
并没有进行设置,直接使用默认自带的,如果要使用其他用户密码,可能需要如下修改。。。

"channel": "mychannel",
 "pg": {
		"host": "127.0.0.1",
		"port": "5432",
		"database": "fabricexplorer",
		"username": "hppoc",
		"passwd": "password"
	},
	//注意后面跟个逗号

8、安装explorer所需的node依赖
On another terminal.

  • cd blockchain-explorer
  • npm install
  • cd blockchain-explorer/app/test
  • npm install
  • npm run test
  • cd client/
  • npm install
  • npm test – -u --coverage
  • npm run build

!!!注意,如果中间出错,重新安装时先要删除node_modules文件夹,client里的也需要;(改动上面的配置文件之后,删除这两个文件夹,重新执行上面命令)如下:

//删除blockchain-explorer内的node_modules文件夹
wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer$ sudo rm -r node_modules/
[sudo] password for wang: 
wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer$ ls
app             CONFIG-COMPOSER-HLEXPLORER.md  LICENSE  MAINTAINERS.rst  package-lock.json  start.sh      TROUBLESHOOT.md
appconfig.json  CONTRIBUTING.md                logs     monitor.sh       README.md          stop.sh
client          devenv                         main.js  package.json     release_notes      swagger.json
//client文件夹内的也删除
wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer$ cd client/
wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer/client$ ls
build  coverage  package.json  package-lock.json  public  README.md  src
wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer$ npm install
打印:

> dtrace-provider@0.8.7 install /home/wang/go/src/github.com/hyperledger/blockchain-explorer/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js

make: Entering directory '/home/wang/go/src/github.com/hyperledger/blockchain-explorer/node_modules/dtrace-provider/build'
  TOUCH Release/obj.target/DTraceProviderStub.stamp
make: Leaving directory '/home/wang/go/src/github.com/hyperledger/blockchain-explorer/node_modules/dtrace-provider/build'

> pkcs11js@1.0.16 install /home/wang/go/src/github.com/hyperledger/blockchain-explorer/node_modules/pkcs11js
> node-gyp rebuild

make: Entering directory '/home/wang/go/src/github.com/hyperledger/blockchain-explorer/node_modules/pkcs11js/build'
  CXX(target) Release/obj.target/pkcs11/src/main.o
  CXX(target) Release/obj.target/pkcs11/src/dl.o
  CXX(target) Release/obj.target/pkcs11/src/const.o
  CXX(target) Release/obj.target/pkcs11/src/pkcs11/error.o
  CXX(target) Release/obj.target/pkcs11/src/pkcs11/v8_convert.o
  CXX(target) Release/obj.target/pkcs11/src/pkcs11/template.o
  CXX(target) Release/obj.target/pkcs11/src/pkcs11/mech.o
  CXX(target) Release/obj.target/pkcs11/src/pkcs11/param.o
  CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_aes.o
  CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_rsa.o
  CXX(target) Release/obj.target/pkcs11/src/pkcs11/param_ecdh.o
  CXX(target) Release/obj.target/pkcs11/src/pkcs11/pkcs11.o
  CXX(target) Release/obj.target/pkcs11/src/async.o
  CXX(target) Release/obj.target/pkcs11/src/node.o
  SOLINK_MODULE(target) Release/obj.target/pkcs11.node
  COPY Release/pkcs11.node
make: Leaving directory '/home/wang/go/src/github.com/hyperledger/blockchain-explorer/node_modules/pkcs11js/build'

> websocket@1.0.26 install /home/wang/go/src/github.com/hyperledger/blockchain-explorer/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/home/wang/go/src/github.com/hyperledger/blockchain-explorer/node_modules/websocket/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  COPY Release/validation.node
make: Leaving directory '/home/wang/go/src/github.com/hyperledger/blockchain-explorer/node_modules/websocket/build'

> grpc@1.10.1 install /home/wang/go/src/github.com/hyperledger/blockchain-explorer/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "/home/wang/go/src/github.com/hyperledger/blockchain-explorer/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node" is installed via remote
added 571 packages in 53.079s
wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer$ cd client/
wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer/client$ ls
build  coverage  package.json  package-lock.json  public  README.md  src
wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer/client$ npm install
打印:

> jss@9.8.0 postinstall /home/wang/go/src/github.com/hyperledger/blockchain-explorer/client/node_modules/jss
> node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/jss/donate\u001b[0m')"

Love JSS? You can now support us on open collective:
 > https://opencollective.com/jss/donate

> uglifyjs-webpack-plugin@0.4.6 postinstall /home/wang/go/src/github.com/hyperledger/blockchain-explorer/client/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1639 packages in 40.194s

到这步都没问题,然后报错:

wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer/client$ npm run build

> hyperledger-explorer-client@0.3.3 build /home/wang/go/src/github.com/hyperledger/blockchain-explorer/client
> react-scripts build

Failed to compile.

EACCES: permission denied, rmdir '/home/wang/go/src/github.com/hyperledger/blockchain-explorer/client/build/static/css'


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hyperledger-explorer-client@0.3.3 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hyperledger-explorer-client@0.3.3 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/wang/.npm/_logs/2018-12-14T03_07_32_766Z-debug.log

打印说permission denied,所以sudo执行(将那两个文件夹删除重新再执行):

wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer/client$ sudo npm run build

> hyperledger-explorer-client@0.3.3 build /home/wang/go/src/github.com/hyperledger/blockchain-explorer/client
> react-scripts build

Creating an optimized production build...
Compiled with warnings.

./src/components/Lists/Channels.js
  Line 11:  Useless constructor  no-useless-constructor

./src/components/Lists/Blocks.js
  Line 12:  'FontAwesome' is defined but never used  no-unused-vars

./src/components/View/BlockView.js
  Line 15:  'blockIcon' is assigned a value but never used  no-unused-vars

./src/components/Header/HeaderView.js
  Line 18:   'Button' is defined but never used              no-unused-vars
  Line 156:  Expected '===' and instead saw '=='             eqeqeq
  Line 175:  Expected '===' and instead saw '=='             eqeqeq
  Line 250:  'classes' is assigned a value but never used    no-unused-vars
  Line 254:  'dashLink' is assigned a value but never used   no-unused-vars
  Line 257:  'transLink' is assigned a value but never used  no-unused-vars

./src/components/App/App.js
  Line 20:  'blockPerHour' is assigned a value but never used        no-unused-vars
  Line 21:  'blockPerMin' is assigned a value but never used         no-unused-vars
  Line 22:  'transactionPerHour' is assigned a value but never used  no-unused-vars
  Line 23:  'transactionPerMin' is assigned a value but never used   no-unused-vars
  Line 24:  'transactionByOrg' is assigned a value but never used    no-unused-vars
  Line 25:  'notification' is assigned a value but never used        no-unused-vars
  Line 26:  'dashStats' is assigned a value but never used           no-unused-vars
  Line 27:  'channel' is assigned a value but never used             no-unused-vars
  Line 28:  'channelList' is assigned a value but never used         no-unused-vars
  Line 29:  'changeChannel' is assigned a value but never used       no-unused-vars
  Line 30:  'peerStatus' is assigned a value but never used          no-unused-vars
  Line 34:  'blockList' is assigned a value but never used           no-unused-vars
  Line 35:  'chaincodeList' is assigned a value but never used       no-unused-vars
  Line 36:  'channels' is assigned a value but never used            no-unused-vars
  Line 37:  'peerList' is assigned a value but never used            no-unused-vars
  Line 38:  'transactionInfo' is assigned a value but never used     no-unused-vars
  Line 39:  'transactionList' is assigned a value but never used     no-unused-vars

./src/components/Panels/AdminPanel.js
  Line 20:  Useless constructor         no-useless-constructor
  Line 49:  No duplicate props allowed  react/jsx-no-duplicate-props

./src/components/View/ChaincodeModal.js
  Line 23:  Useless constructor                           no-useless-constructor
  Line 37:  'classes' is assigned a value but never used  no-unused-vars

./src/components/Panels/NotificationsPanel.js
  Line 26:  Useless constructor  no-useless-constructor
  Line 38:  Unreachable code     no-unreachable
  Line 45:  Unreachable code     no-unreachable

./src/components/Charts/OrgPieChart.js
  Line 27:  Missing radix parameter  radix

./src/components/View/DashboardView.js
  Line 32:  Expected '===' and instead saw '=='  eqeqeq
  Line 32:  Expected '===' and instead saw '=='  eqeqeq
  Line 32:  Expected '===' and instead saw '=='  eqeqeq
  Line 32:  Expected '===' and instead saw '=='  eqeqeq

./src/components/Forms/ChannelForm.js
  Line 34:  Useless constructor  no-useless-constructor

./src/components/View/ChannelsView.js
  Line 41:  Useless constructor  no-useless-constructor

./src/components/View/TransactionsView.js
  Line 41:  Useless constructor  no-useless-constructor

./src/components/View/BlocksView.js
  Line 41:  Useless constructor                           no-useless-constructor
  Line 46:  'classes' is assigned a value but never used  no-unused-vars

./src/components/View/ChaincodeView.js
  Line 42:  Useless constructor  no-useless-constructor

./src/components/View/NetworkView.js
  Line 42:  Useless constructor                           no-useless-constructor
  Line 47:  'classes' is assigned a value but never used  no-unused-vars

./src/components/Lists/Peers.js
  Line 6:  'Container' is defined but never used  no-unused-vars
  Line 6:  'Row' is defined but never used        no-unused-vars
  Line 6:  'Col' is defined but never used        no-unused-vars

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  399.19 KB  build/static/js/main.1eab14a4.js
  39.13 KB   build/static/css/main.ba8165c2.css

The project was built assuming it is hosted at the server root.
You can control this with the homepage field in your package.json.
For example, add this to build it for GitHub Pages:

  "homepage" : "http://myname.github.io/myapp",

The build folder is ready to be deployed.
You may serve it with a static server:

  npm install -g serve
  serve -s build

Find out more about deployment here:

  http://bit.ly/2vY88Kr

那些warning不用在意。
9、new terminal运行Hyperlegder Explorer
也要以sudo方式:

wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer$ sudo ./start.sh 

看下日志:

wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer/logs/console$ ls
console.log-2018-12-14
wang@wang:~/go/src/github.com/hyperledger/blockchain-explorer/logs/console$ cat console.log-2018-12-14 
postgres://hppoc:password@127.0.0.1:5432/fabricexplorer

Property config.syncStartDate set to  2018/01/01


Please open web browser to access :http://localhost:8080/

访问一下http://localhost:8080/
多刷新两次。。

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
单独做一笔交易试试:

wang@wang:~/go/src/github.com/hyperledger/fabric-samples/first-network$ docker exec -it cli bash
root@c9603e1ffc03:/opt/gopath/src/github.com/hyperledger/fabric/peer# export ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
root@c9603e1ffc03:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode invoke -o orderer.example.com:7050  --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA -C mychannel -n mycc -c '{"Args":["invoke","a","b","10"]}'
2018-12-14 06:46:20.940 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-12-14 06:46:20.940 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2018-12-14 06:46:20.961 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 003 Chaincode invoke successful. result: status:200 
2018-12-14 06:46:20.961 UTC [main] main -> INFO 004 Exiting.....
root@c9603e1ffc03:/opt/gopath/src/github.com/hyperledger/fabric/peer#

再看下explorer:
在这里插入图片描述
过程:
重新清理fabric网络
重新启动fabric网络
重新打包部署(打包、下载依赖、部署):
cd blockchain-explorer
npm install
cd client/
npm install
sudo npm run build

如果遇到 root没权限,则需要使用非安全模式,顺便输出下详细日志如下:
cd blockchain-explorer
npm install --unsafe-perm -d
cd client/
npm install --unsafe-perm -d
npm run build --unsafe-perm -d

最后sudo ./start.sh
访问网页
(数据库一直处于连接状态,断开的话重新连接
wang@wang:~$ sudo -u postgres psql
不用再建表)

https://github.com/hyperledger/blockchain-explorer/tree/release-3.4
https://blog.csdn.net/leehom__/article/details/81022151
https://www.jianshu.com/p/eac679b2e871

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值