In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use Hyperledger Fabric to integrate Hyperledger Explorer, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Hyperledger explorer is mainly to build a visual environment for the blockchain network of Hyperledger. You can view the information in the network through the browser, including network topology, block information, chain code information, and so on. This article is deployed in fabric v1.4.4, the operating system is CentOS 7, and the deployment fabric can refer to https://www.jianshu.com/p/090307969c0f, so we will not repeat it here.
Hyperledger explorer source address: https://github.com/hyperledger/blockchain-explorer dependence: Nodejs (8.11.x) PostgreSQ Jq PS:Nodejs do not download the latest download 8.11.x version, I started to download the latest caused a lot of compilation problems. There are dependency restrictions in hyperledger explorer's github that describe different versions.
1. Install Nodejs 1.1and download NodeJs wget https://nodejs.org/download/release/v8.11.4/node-v8.11.4-linux-x64.tar.gz tar-zxvf node-v8.11.4-linux-x64.tar.gz mv node-v8.11.4-linux-x64 node-v8.11.4
1.2.Configuring NodeJs environment
Open the configuration file vi / etc/profile
Add the following configuration export NODE_HOME=/opt/node-v8.11.4 export PATH=$NODE_HOME/bin:$PATH at the end
Make the configuration effective immediately source / etc/profile
2. Install jq yum install jq
3. Install gcc-c++ (required for compilation) yum install-y gcc-c++
4. Configure PostgreSQ
Install PostgreSQL client\ install PostgreSQL server PostgreSQL 10 use the yum repository yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat10-10-2.noarch.rpm yum install-y postgresql10-server postgresql10
4.2.Optionally initialize the database and enable automatic startup: / usr/pgsql-10/bin/postgresql-10-setup initdb
Systemctl enable postgresql-10 & & systemctl start postgresql-10
4.3 change password encryption and access restrictions vi / var/lib/pgsql/10/data/postgresql.conf change # listen_addresses=' localhost' to listen_addresses='*'
Vi / var/lib/pgsql/10/data/pg_hba.conf add host all all 0.0.0.0 Universe 0 md5
Systemctl restart postgresql-10
4.4 initial database and its related tables
Log in to the database and change the prompt to 'postgres=#' psql-U postgres' after execution
Set the postgres user password (! This password should be careful not to contain the @ symbol) ALTER USER postgres WITH PASSWORD 'postgres'
Create a new user for the database, such as root (since my virtual machine uses root to log in, the root account is used by default when executing initialization scripts, so first create a root user and data, and assign administrator privileges) CREATE USER root WITH PASSWORD 'root'
Create a user database, such as root: CREATE DATABASE root OWNER root
Assign all permissions to the root database to root: GRANT ALL PRIVILEGES ON DATABASE root TO root
-- Authorization to users-Administrator permissions ALTER USER root superuser
Exit the database\ Q
Vi blockchain-explorer/app/explorerconfig.json contains the library name and account number of the corresponding postgresql.
Cd blockchain-explorer/app/persistence/fabric/postgreSQL/db
Execute the database initialization script and enter the root password. / createdb.sh
5. Edit and deploy the blockchain-explorer project
5.1Configuring Certificate path cd / opt/hyperledger/blockchain-explorer
Change all fabric-path to the path where your local fabric-samples is located, vi app/platform/fabric/config.json 5.2, compile the project cd blockchain-explorer npm install-- unsafe-perm-d npm install
Cd blockchain-explorer/app/test npm install npm run test
Cd blockchain-explorer/client/ npm install-- unsafe-perm-d npm install npm run test-u-- coverage npm run build-- unsafe-perm-d
Cd blockchain-explorer 6. Start the project. / start.sh
Enter ip:8080 to access
Thank you for reading this article carefully. I hope the article "how to integrate Hyperledger Explorer with Hyperledger Fabric" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.