CENTOS7 block chain Hyperledger Fabric1.0.0 installation __fabric

Source: Internet
Author: User
Tags git clone docker compose

Prerequisite conditions

CentOS 7.4 64-bit

Install Docker and configure the Aliyun accelerator

Install Docker Compose


Install Golang

Because of the forbidden relationship, there is no way to direct access to the golang.org site, but the domestic download site a lot of their own Baidu can be.

My installation path is/usr/local/src/go

Edit/etc/profile file Add related environment variables as follows

Install Git

Yum Install git

Download Fabric Source Code

Mkdir-p ~/go/src/github.com/hyperledger

cd ~/go/src/github.com/hyperledger

git clone https://github.com/ Hyperledger/fabric.git

git checkout v1.0.0

Download Fabric Mirrors

CD fabric/examples/e2e_cli/

chmod +x download-dockerimages.sh

./download-dockerimages-c x86_64-1.0.0-f x86_ 64-1.0.0

Docker Images

Run Fabric Network

./network_setup.sh Up

Run the example and test the network

Docker exec-it CLI Bash

Check account balances

Peer Chaincode query-c mychannel-n mycc-c ' {' Args ': [' query ', ' A ']} '


Transfer 20 to B account from account a

Peer Chaincode invoke-o orderer.example.com:7050  --tls true--cafile/opt/gopath/src/github.com/hyperledger/ fabric/peer/crypto/ordererorganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/ TLSCA.EXAMPLE.COM-CERT.PEM-  C mychannel-n mycc-c ' {"Args": ["Invoke", "a", "B", "20"]} '


Check account balances

Peer Chaincode query-c mychannel-n mycc-c ' {' Args ': [' query ', ' A ']} '

Turn off the network

./network_setup.sh Down

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.