当前位置:网站首页>Hyperledger Explorer 0.3.9 environment construction
Hyperledger Explorer 0.3.9 environment construction
2022-04-22 08:47:00 【Firefly ignition】
This paper mainly introduces HyperLedger Explorer 0.3.9 Build and run the environment of version . If there are any mistakes in the article, you are welcome to point out , If you have other experiences , Thank you for sharing with me .
Catalog
-
-
-
- brief introduction
- One 、nodejs install
- Two 、PostgreSQL10 install
- 3、 ... and 、Jq install
- Four 、gcc install
- 5、 ... and 、Explorer download
- 6、 ... and 、 Modify database configuration ( The following work should be very careful )
- 7、 ... and 、Explorer To configure Fabric The Internet
- 8、 ... and 、Explorer compile
- Nine 、 start-up Explorer
- Ten 、 Problem summary
-
-
brief introduction
- HyperledgerExplorer It's a simple 、 Powerful 、 Easy to use 、 Well maintained open source Utilities , You can browse the activities on the underlying blockchain network .
- Official documents and download addresses : https://github.com/hyperledger/blockchain-explorer/tree/v0.3.9 If there is any confusion, just look at the official documents
- The downloaded version should correspond to :

Fabric1.4 Build and first-network See another blog post for an example test :Hyperledger Fabric1.4 Environment construction and example test
HyperLedger Explorer Install preconditions :
- nodejs 8.11.x (Note that v9.x is not yet supported)
- PostgreSQL 9.5 or greater
- Jq
- gcc-c++
One 、nodejs install
# Download zip
wget https://nodejs.org/dist/v8.11.4/node-v8.11.4-linux-x64.tar.xz
# decompression
tar xvf node-v8.11.4.tar.gz
# You can move the extracted file to /usr/local/src/
# Configure environment variables
vi /etc/profile
Add the following :

# Immediate effect
source /etc/profile
View version

Two 、PostgreSQL10 install
See blog for details : Linux(CentOS) Lower installation PostgreSQL
3、 ... and 、Jq install
yum install epel-release
yum install jq
Four 、gcc install
yum install -y gcc-c++
5、 ... and 、Explorer download
# Download the source code
# cd /opt/gopath/src/github.com/hyperledger
# git clone https://github.com/hyperledger/blockchain-explorer.git
# Switch Fabric edition
# git checkout -b release-3.9 origin/release-3.9
Downloading can be slow , I download it directly on the official website 0.3.9 Version of explorer Source compression file , Upload to Linux Then decompress , Place in /opt/gopath/src/github.com/hyperledger/


6、 ... and 、 Modify database configuration ( The following work should be very careful )
You can change the folder name blockchain-explorer-0.3.9 It is amended as follows blockchain-explorer
1、 Modify database configuration
cd blockchain-explorer/app
vi explorerconfig.json
# The official default configuration is as follows . user name username And password passwd Can be modified by yourself
"postgreSQL": {
"host": "127.0.0.1",
"port": "5432",
"database": "fabricexplorer",
"username": "hppoc",
"passwd": "password"
}
cd persistence/fabric/postgreSQL
chmod -R 775 db/
cd db
2、 establish postpresSQL database
The official document is the execution script ./createdb.sh To create .
I'll have problems here , So I use manual creation . If you can use ./createdb.sh Command to create , Share your feelings with me .
First use the client Navicat Connect to postpresSQL
1) Create the role
User name and password of the role , Namely xplorerconfig.json The configuration of the username,passwd

2) Create database
The database name is fabricexplorer, And the owner of the database owner Set to username This user
There may be a mistake here :ERROR: source database “template1” is being accessed by other users
# View template database “template1” The process number of
ps -ef|grep postg
# Kill the process
kill -9 Process number
# Try creating the database again
Never used postpresSQL, Some questions are really unfamiliar , The solution to this problem is to refer to the article :https://blog.csdn.net/design321/article/details/24740769
3) Create table
take blockchain-explorer/app/persistence/fabric/postgreSQL/db In the catalog explorerpg.sql Download to local , stay Navicat On the implementation , And will all :user Change to the corresponding username

After finishing, it is shown in the picture :

4) After all are created, check on the server
postpresSQL Chinese Course :https://www.runoob.com/postgresql/postgresql-create-table.html

7、 ... and 、Explorer To configure Fabric The Internet
With the official test network first-network For example
cd /opt/gopath/src/github.com/hyperledger/blockchain-explorer/app/platform/fabric
vi config.json
# be-all fabric-path Change to your own path
Such as :

8、 ... and 、Explorer compile
cd blockchain-explorer
npm install
cd client/
npm install
npm run build
If you encounter insufficient permissions , To give permission
chmod -R 755 In the directory
Nine 、 start-up Explorer
Start... First first-network The Internet
cd blockchain-explorer
# start-up
./start.sh
Log is located blockchain-explorer/logs/console/
Log of successful startup, such as :

Open the web page :

If it's a cloud server , Remember to open in the security group 8080 port
# stop it
./stop.sh
Ten 、 Problem summary
1、 start-up explorer You don't succeed , The log file shows
Error: The gRPC binary module was not installed. This may be fixed by running "npm rebuild"

solve :
npm rebuild grpc
If prompted :
nodejs gyp WARN EACCES user “root” does not have permission to access the dev dir
execute
npm rebuild grpc --unsafe-perm
2、 other : To be added …
Refer to the post :
https://cloud.tencent.com/developer/article/1697210
Official documents :
https://github.com/hyperledger/blockchain-explorer
版权声明
本文为[Firefly ignition]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220747538475.html
边栏推荐
- pycharm
- 工业缺陷检测项目实战(三)——基于FPN_Tensorflow的PCB缺陷检测
- 详解转义字符
- 聚看点 (详细版) 吃低保 每天几毛 青龙
- varchar与char有什么区别?
- Shell script learning notes - circular statements
- Rhel7 logical volume management - Notes
- Single page application
- winkawaks1. 45 how do I go online? winkawaks1. 45 how to play online (similar to other versions)
- Explain escape character
猜你喜欢
随机推荐
JS跨域问题解决
Fabric test example, encountered order exited (x) x seconds
sql查询去除空数据和null 字段
机器学习之概率模型
How does CSDN reprint articles
解决磁盘有空间但创建不了文件---修复服务器文件系统
Install_ FAILED_ MISSING_ SHARED_ LIBRARY
Use serialize in the record node to automatically generate the table model and link the operation database (take PostgreSQL as an example)
Pointer and array (detailed operation)
235. Nearest common ancestor of binary search tree (easy)
DTV专业术语
解决办法Access denied for user ‘root‘@‘localhost‘ (using password: YES)
C语言的学习目标和大致内容
sql 中对varchar类型进行求和(sum)方法 (类型报错)
Pointer and string
RedHat7配置yum
Shell notes
pycharm
初识C语言~循环语句
static的用法【详解】







