Simple building block chain browser in fabric

Source: Internet
Author: User

Block chain browser can make the project more intuitive to show the preliminary preparation

Install GIT,MYSQL,NODE,NPM, each version as follows
One pulls the item from the GitHub

git clone https://github.com/hyperledger/blockchain-explorer.git
CD Blockchain-explorer
Two new database and configuration file

Create a new database from a file in Db/fabricexplorer.sql

Mysql-u<username>-P < Db/fabricexplorer.sql

Then configure the database information
Configure and modify database-related configuration information in the Config.json of the current folder

"Channel": "MyChannel", "
 MySQL": {
      "host": "127.0.0.1",
      "database": "Fabricexplorer",
      "username": " Root ",        //database user name
      " passwd ":" 123456 "        //Database Password
   }
Simple configuration of three node

In the Package.json of the current folder, add "Private": true,
As follows:

{"
  name": "Fabric-explorer", "
  Version": "0.0.1",
  "description": "Fabric-explorer",
  "private": True,
  "main": "Main.js",

Open the terminal and enter the following command in Blockchain-explorer

NPM Install
Four block chain browser start and run

Enter the following command in the terminal

./start.sh

The input is not prompted, you can directly in the current folder in the Log.log to view the relevant log information, when the error will be prompted to complain, the correct first behavior: "Please open Internet Explorer to access:http:// localhost:8080/
At this point, open http://localhost:8080/, block chain browser has started successfully.
The successful screenshot is as follows:
A simple example of the four-run pass fabric

1 Enter the folder where the fabric example resides

CD first-network/

2 in the First-network folder, move binaries Configtxgen and Cryptogen in the Bin folder to the First-network folder.
3 Download Docker images (now you need your system to install docker,docker-compose)

./bootstrap-1.0.2.sh

4 Creating the Channel-artifacts folder

Mkdir-p./channel-artifacts

5 Generate Genesis blocks, channels, certificates and other related documents

./byfn.sh-m generate-c MyChannel

(When execution to this step, 6 unsuccessful, continue block chain browser startup, but also can start, but there is no way to view real-time block information, only see the block chain browser's approximate page, as well as those features.) )
6 running the examples in fabric

./byfn.sh-m up-c MyChannel

After you enter the command, continue to enter Y, when the end-to-end is displayed, the expression has succeeded. Five block chain browser start and run

Enter the following command in the terminal under the Blockchain-explorer folder

./start.sh

The input is not prompted, you can directly in the current folder in the Log.log to view the relevant log information, when the error will be prompted to complain, the correct first behavior: "Please open Internet Explorer to access:http:// localhost:8080/
At this point, open http://localhost:8080/, block chain browser has started successfully.
The successful screenshot is as follows:

The above for the block chain browser deployment of the basic process, I hope to help you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.