注意:进行本文操作的前提是已完成Hyperledger Fabric的开发环境搭建,具体搭建步骤可参考[Hyperledger Fabric开发环境搭建(https://blog.csdn.net/yuanziwoxin/article/details/92831521)

文章目录

  • 一、下载Fabric源码库
  • 二、安装configtxgen和configtogen(Fabric 1.4及以上可忽略本操作)
    • (1)安装configtxgen
    • (2)安装configtogen
  • 三、执行引导脚本
  • 四、添加环境变量
  • 五、检查环境变量是否配置成功
  • 六、创建和管理网络
    • (1)生成所需的证书,并创建创世区块
    • (2)启动网络
    • (3)查看节点的启动情况
    • (4)关闭网络

一、下载Fabric源码库

我们需要将仓库clone到 $GOPATH/src目录下,具体操作如下:

cd $GOPATH/src
mkdir -p github.com/hyperledger
cd github.com/hyperledger

把代码库clone下来

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

二、安装configtxgen和configtogen(Fabric 1.4及以上可忽略本操作)

如果是fabric 1.0版本,才需要进行如下步骤,1.4及以上可忽略下面两步操作(现在默认下载下来的fabric源码库版本是1.4或者以上)。

(1)安装configtxgen

cd common/configtx/tool/configtxgen
go install --tags=nopkcsll

fabric 1.4 这个目录下未找到configtxgen, 可能切换成1.0版本才有。

(2)安装configtogen

cd /common/tools/cryptogen
go install --tags=nopkcsll

注意:
如需切换Fabric源代码的版本,可使用如下命令:
(1)先打开Fabric源码库的存放文件夹fabric

# 针对你当前所在目录,cd后面的路径可能要进行相应的修改
cd fabric

将Fabric源码库的版本切换到1.4 (在fabric目录下执行)

git checkout release-1.4

切换成其他的版本,只需修改“ release-x”中的x为相应的版本号即可

三、执行引导脚本

在Fabric源码库的scripts文件夹下有一个bootstrap.sh的引导脚本

cd scripts
ls

查看结果如下:

bootstrap.sh       check_trailingspaces.sh  metrics_doc.sh
changelog.sh       compile_protos.sh        multiarch.sh
check_deps.sh      generateHelpDocs.sh      pull_build_artifacts.sh
check_license.sh   golinter.sh              run-integration-tests.sh
check_spelling.sh  goListFiles.sh

执行引导脚本bootstrap.sh,就会自动进行fabric相关镜像的下载 ,并且还会把fabric samples库下载下来(时间可能有点久,如果出现长时间停顿,可以尝试重新执行脚本)

./bootstrap.sh

下载完成之后,可以通过下列命令去查看已下载的Fabric镜像:

sudo docker images | grep hyperledger*

查询结果如下:

hyperledger/fabric-ca          1.4.1               3a1799cda5d7        2 months ago        252MB
hyperledger/fabric-ca          latest              3a1799cda5d7        2 months ago        252MB
hyperledger/fabric-tools       1.4.1               432c24764fbb        2 months ago        1.55GB
hyperledger/fabric-tools       latest              432c24764fbb        2 months ago        1.55GB
hyperledger/fabric-ccenv       1.4.1               d7433c4b2a1c        2 months ago        1.43GB
hyperledger/fabric-ccenv       latest              d7433c4b2a1c        2 months ago        1.43GB
hyperledger/fabric-orderer     1.4.1               ec4ca236d3d4        2 months ago        173MB
hyperledger/fabric-orderer     latest              ec4ca236d3d4        2 months ago        173MB
hyperledger/fabric-peer        1.4.1               a1e3874f338b        2 months ago        178MB
hyperledger/fabric-peer        latest              a1e3874f338b        2 months ago        178MB
hyperledger/fabric-javaenv     1.4.1               b8c9d7ff6243        2 months ago        1.74GB
hyperledger/fabric-javaenv     latest              b8c9d7ff6243        2 months ago        1.74GB
hyperledger/fabric-zookeeper   0.4.15              20c6045930c8        3 months ago        1.43GB
hyperledger/fabric-zookeeper   latest              20c6045930c8        3 months ago        1.43GB
hyperledger/fabric-kafka       0.4.15              b4ab82bbaf2f        3 months ago        1.44GB
hyperledger/fabric-kafka       latest              b4ab82bbaf2f        3 months ago        1.44GB
hyperledger/fabric-couchdb     0.4.15              8de128a55539        3 months ago        1.5GB
hyperledger/fabric-couchdb     latest              8de128a55539        3 months ago        1.5GB
hyperledger/fabric-baseos      latest              9d6ec11c60ff        3 months ago        145MB

在scripts目录下执行查看命令ls, 会发现文件夹中多了一个fabric samples文件夹:

bootstrap.sh   check_license.sh         compile_protos.sh    golinter.sh     multiarch.sh
changelog.sh   check_spelling.sh        fabric-samples       goListFiles.sh  pull_build_artifacts.sh
check_deps.sh  check_trailingspaces.sh  generateHelpDocs.sh  metrics_doc.sh  run-integration-tests.sh

四、添加环境变量

打开profile文件

sudo vim /etc/profile

将最后一行的Path, 在原来的配置基础上再添加“:$GOPATH/src/github.com/hyperledger/fabric-samples/bin ”,添加之后如下所示:

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin:$GOPATH/src/github.com/hyperledger/fabric/scripts/fabric-samples/bin

注意:我们直接从github上clone下来的fabric-samples源代码库目录下是没有bin这个目录,而经过我们执行引导脚本之后,fabric/scripts/fabric-samples目录下是有bin目录的,所以这里配置指向的是fabric/scripts/fabric-samples这个目录。

为了使修改的配置文件立即生效,记得使用source命令:

source /etc/profile

五、检查环境变量是否配置成功

fabric-ca-client version

运行结果如下:

fabric-ca-client:Version: 1.4.1Go version: go1.11.5OS/Arch: linux/amd64

六、创建和管理网络

构建您的第一个网络(BYFN)方案提供了一个Hyperledger Fabric网络示例,该网络由两个组织组成,每个组织维护两个peer节点。它还将默认部署“Solo”排序服务,但也可以使用其他排序服务实现。
基于fabric-samples提供的BYFN(build your first network),来快速的构建我们第一个超级账本fabric网络,以此来熟悉整个运行过程。
先进入fabric/scripts/fabric-samples/first-network/目录下:

cd $GOPATH/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network

使用ls命令

ls

我们可以看到其中包含了一个byfn.sh文件,这就是我们所需要的快速构建hyperledger fabric网络的脚本:

base                     docker-compose-couch-org3.yaml    eyfn.sh
byfn.sh                  docker-compose-couch.yaml         org3-artifacts
channel-artifacts        docker-compose-e2e-template.yaml  README.md
configtx.yaml            docker-compose-etcdraft2.yaml     scripts
crypto-config.yaml       docker-compose-kafka.yaml
docker-compose-cli.yaml  docker-compose-org3.yaml

现在我们来了解一下byfn.sh脚本的相关命令和参数,这些在以后的开发工作中会大有裨益:

Usage: byfn.sh <mode> [-c <channel name>] [-t <timeout>] [-d <delay>] [-f <docker-compose-file>] [-s <dbtype>] [-l <language>] [-o <consensus-type>] [-i <imagetag>] [-v]<mode> - one of 'up', 'down', 'restart', 'generate' or 'upgrade'- 'up' - bring up the network with docker-compose up  //启动网络- 'down' - clear the network with docker-compose down  //关闭网络- 'restart' - restart the network  //重启网络- 'generate' - generate required certificates and genesis block// 生成所需的证书和创世区块- 'upgrade'  - upgrade the network from version 1.3.x to 1.4.0// 将网络从1.3.x升级到1.4.0-c <channel name> - channel name to use (defaults to "mychannel")// 设置通道名字(默认是“mychannel”)-t <timeout> - CLI timeout duration in seconds (defaults to 10)// CLI的超时时间,单位为秒(默认为10秒)-d <delay> - delay duration in seconds (defaults to 3)// 延时时间(默认为3秒)-f <docker-compose-file> - specify which docker-compose file use (defaults to docker-compose-cli.yaml)// 指定使用哪一个docker-compose文件(默认是docker-compose-cli.yaml
)-s <dbtype> - the database backend to use: goleveldb (default) or couchdb// 指定使用的数据库:goleveldb(默认)或者couchdb-l <language> - the chaincode language: golang (default) or node// 指定链码使用的语言:golang(默认)或者node-o <consensus-type> - the consensus-type of the ordering service: solo (default), kafka, or etcdraft// 指定排序服务使用的共识机制:solo(默认),kafka,或者etcdraft-i <imagetag> - the tag to be used to launch the network (defaults to "latest")// 用于启动网络的版本(默认是“最新”) -v - verbose mode   // 详细模式byfn.sh -h (print this message)Typically, one would first generate the required certificates and
genesis block, then bring up the network. e.g.:// 生成所需的证书和创世区块,设置的通道名称为mychannelbyfn.sh generate -c mychannel // 启动mychannel网络,使用的数据库为couchdb byfn.sh up -c mychannel -s couchdb// 在上面的基础上,指定了启动网络的fabric的版本号byfn.sh up -c mychannel -s couchdb -i 1.4.0// 启动网络,编写链码的语言是nodebyfn.sh up -l node// 关闭网络byfn.sh down -c mychannel// 将网络从1.3.x升级到1.4.0byfn.sh upgrade -c mychannelTaking all defaults:byfn.sh generatebyfn.sh upbyfn.sh down

(1)生成所需的证书,并创建创世区块

sudo ./byfn.sh generate -c yuan

(2)启动网络

sudo ./byfn.sh up -c yuan

运行结果如下:

Starting for channel 'yuan' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
LOCAL_VERSION=1.4.1
DOCKER_IMAGE_VERSION=1.4.1
Creating network "net_byfn" with the default driver
Creating volume "net_orderer.example.com" with default driver
Creating volume "net_peer0.org1.example.com" with default driver
Creating volume "net_peer1.org1.example.com" with default driver
Creating volume "net_peer0.org2.example.com" with default driver
Creating volume "net_peer1.org2.example.com" with default driver
Creating peer1.org1.example.com ... done
Creating peer0.org2.example.com ... done
Creating orderer.example.com    ... done
Creating peer1.org2.example.com ... done
Creating peer0.org1.example.com ... done
Creating cli                    ... done
CONTAINER ID        IMAGE                               COMMAND             CREATED             STATUS                    PORTS                      NAMES
b5f3e635b02e        hyperledger/fabric-tools:latest     "/bin/bash"         3 seconds ago       Up Less than a second                                cli
3cdfdd11858e        hyperledger/fabric-peer:latest      "peer node start"   10 seconds ago      Up 3 seconds              0.0.0.0:7051->7051/tcp     peer0.org1.example.com
75d8b85a229c        hyperledger/fabric-peer:latest      "peer node start"   10 seconds ago      Up 3 seconds              0.0.0.0:10051->10051/tcp   peer1.org2.example.com
29aaf8c1816a        hyperledger/fabric-orderer:latest   "orderer"           10 seconds ago      Up 2 seconds              0.0.0.0:7050->7050/tcp     orderer.example.com
1b7522769f77        hyperledger/fabric-peer:latest      "peer node start"   10 seconds ago      Up 3 seconds              0.0.0.0:8051->8051/tcp     peer1.org1.example.com
2b1eb5ed28bf        hyperledger/fabric-peer:latest      "peer node start"   10 seconds ago      Up 3 seconds              0.0.0.0:9051->9051/tcp     peer0.org2.example.com
a0d59b8ce754        hello-world                         "/hello"            11 hours ago        Exited (0) 11 hours ago                              jolly_nobel____    _____      _      ____    _____
/ ___|  |_   _|    / \    |  _ \  |_   _|
\___ \    | |     / _ \   | |_) |   | |  ___) |   | |    / ___ \  |  _ <    | |
|____/    |_|   /_/   \_\ |_| \_\   |_|  Build your first network (BYFN) end-to-end testChannel name : yuan
Creating channel...
+ peer channel create -o orderer.example.com:7050 -c yuan -f ./channel-artifacts/channel.tx --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
+ res=0
+ set +x
2019-06-19 13:54:40.946 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:41.119 UTC [cli.common] readBlock -> INFO 002 Received block: 0
===================== Channel 'yuan' created ===================== Having all peers join the channel...
+ peer channel join -b yuan.block
+ res=0
+ set +x
2019-06-19 13:54:41.322 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:41.787 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer0.org1 joined channel 'yuan' ===================== + peer channel join -b yuan.block
+ res=0
+ set +x
2019-06-19 13:54:44.887 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:45.338 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer1.org1 joined channel 'yuan' ===================== + peer channel join -b yuan.block
+ res=0
+ set +x
2019-06-19 13:54:48.426 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:48.886 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer0.org2 joined channel 'yuan' ===================== + peer channel join -b yuan.block
+ res=0
+ set +x
2019-06-19 13:54:52.001 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:52.444 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer1.org2 joined channel 'yuan' ===================== Updating anchor peers for org1...
+ peer channel update -o orderer.example.com:7050 -c yuan -f ./channel-artifacts/Org1MSPanchors.tx --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
+ res=0
+ set +x
2019-06-19 13:54:55.557 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:55.572 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update
===================== Anchor peers updated for org 'Org1MSP' on channel 'yuan' ===================== Updating anchor peers for org2...
+ peer channel update -o orderer.example.com:7050 -c yuan -f ./channel-artifacts/Org2MSPanchors.tx --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
+ res=0
+ set +x
2019-06-19 13:54:58.665 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-06-19 13:54:58.677 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update
===================== Anchor peers updated for org 'Org2MSP' on channel 'yuan' ===================== Installing chaincode on peer0.org1...
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2019-06-19 13:55:01.798 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-06-19 13:55:01.798 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2019-06-19 13:55:04.602 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" >
===================== Chaincode is installed on peer0.org1 ===================== Install chaincode on peer0.org2...
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2019-06-19 13:55:04.897 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-06-19 13:55:04.897 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2019-06-19 13:55:05.040 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" >
===================== Chaincode is installed on peer0.org2 ===================== Instantiating chaincode on peer0.org2...
+ peer chaincode instantiate -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 yuan -n mycc -l golang -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P 'AND ('\''Org1MSP.peer'\'','\''Org2MSP.peer'\'')'
+ res=0
+ set +x
2019-06-19 13:55:05.107 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-06-19 13:55:05.107 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
===================== Chaincode is instantiated on peer0.org2 on channel 'yuan' ===================== Querying chaincode on peer0.org1...
===================== Querying on peer0.org1 on channel 'yuan'... =====================
Attempting to Query peer0.org1 ...3 secs
+ peer chaincode query -C yuan -n mycc -c '{"Args":["query","a"]}'
+ res=0
+ set +x100
===================== Query successful on peer0.org1 on channel 'yuan' =====================
Sending invoke transaction on peer0.org1 peer0.org2...
+ 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 yuan -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:9051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["invoke","a","b","10"]}'
+ res=0
+ set +x
2019-06-19 13:56:03.011 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200
===================== Invoke transaction successful on peer0.org1 peer0.org2 on channel 'yuan' ===================== Installing chaincode on peer1.org2...
+ peer chaincode install -n mycc -v 1.0 -l golang -p github.com/chaincode/chaincode_example02/go/
+ res=0
+ set +x
2019-06-19 13:56:03.093 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-06-19 13:56:03.093 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
2019-06-19 13:56:03.385 UTC [chaincodeCmd] install -> INFO 003 Installed remotely response:<status:200 payload:"OK" >
===================== Chaincode is installed on peer1.org2 ===================== Querying chaincode on peer1.org2...
===================== Querying on peer1.org2 on channel 'yuan'... =====================
+ peer chaincode query -C yuan -n mycc -c '{"Args":["query","a"]}'
Attempting to Query peer1.org2 ...3 secs
+ res=0
+ set +x90
===================== Query successful on peer1.org2 on channel 'yuan' ===================== ========= All GOOD, BYFN execution completed =========== _____   _   _   ____
| ____| | \ | | |  _ \
|  _|   |  \| | | | | |
| |___  | |\  | | |_| |
|_____| |_| \_| |____/

(3)查看节点的启动情况

sudo docker ps

查询结果如下:

CONTAINER ID        IMAGE                                                                                                  COMMAND                  CREATED             STATUS              PORTS                      NAMES
d2978de47b60        dev-peer1.org2.example.com-mycc-1.0-26c2ef32838554aac4f7ad6f100aca865e87959c9a126e86d764c8d01f8346ab   "chaincode -peer.add…"   39 minutes ago      Up 39 minutes                                  dev-peer1.org2.example.com-mycc-1.0
30bde37b9283        dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9   "chaincode -peer.add…"   39 minutes ago      Up 39 minutes                                  dev-peer0.org1.example.com-mycc-1.0
eccc23cb6774        dev-peer0.org2.example.com-mycc-1.0-15b571b3ce849066b7ec74497da3b27e54e0df1345daff3951b94245ce09c42b   "chaincode -peer.add…"   39 minutes ago      Up 39 minutes                                  dev-peer0.org2.example.com-mycc-1.0
b5f3e635b02e        hyperledger/fabric-tools:latest                                                                        "/bin/bash"              40 minutes ago      Up 40 minutes                                  cli
3cdfdd11858e        hyperledger/fabric-peer:latest                                                                         "peer node start"        41 minutes ago      Up 40 minutes       0.0.0.0:7051->7051/tcp     peer0.org1.example.com
75d8b85a229c        hyperledger/fabric-peer:latest                                                                         "peer node start"        41 minutes ago      Up 40 minutes       0.0.0.0:10051->10051/tcp   peer1.org2.example.com
29aaf8c1816a        hyperledger/fabric-orderer:latest                                                                      "orderer"                41 minutes ago      Up 40 minutes       0.0.0.0:7050->7050/tcp     orderer.example.com
1b7522769f77        hyperledger/fabric-peer:latest                                                                         "peer node start"        41 minutes ago      Up 40 minutes       0.0.0.0:8051->8051/tcp     peer1.org1.example.com
2b1eb5ed28bf        hyperledger/fabric-peer:latest                                                                         "peer node start"        41 minutes ago      Up 40 minutes       0.0.0.0:9051->9051/tcp     peer0.org2.example.com

(4)关闭网络

sudo ./byfn.sh down

运行效果如下:

Stopping for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
Stopping cli                    ... done
Stopping peer0.org1.example.com ... done
Stopping peer1.org2.example.com ... done
Stopping orderer.example.com    ... done
Stopping peer1.org1.example.com ... done
Stopping peer0.org2.example.com ... done
Removing cli                    ... done
Removing peer0.org1.example.com ... done
Removing peer1.org2.example.com ... done
Removing orderer.example.com    ... done
Removing peer1.org1.example.com ... done
Removing peer0.org2.example.com ... done
Removing network net_byfn
Removing volume net_orderer.example.com
Removing volume net_peer0.org1.example.com
Removing volume net_peer1.org1.example.com
Removing volume net_peer0.org2.example.com
Removing volume net_peer1.org2.example.com
Removing volume net_orderer2.example.com
WARNING: Volume net_orderer2.example.com not found.
Removing volume net_orderer3.example.com
WARNING: Volume net_orderer3.example.com not found.
Removing volume net_orderer4.example.com
WARNING: Volume net_orderer4.example.com not found.
Removing volume net_orderer5.example.com
WARNING: Volume net_orderer5.example.com not found.
Removing volume net_peer0.org3.example.com
WARNING: Volume net_peer0.org3.example.com not found.
Removing volume net_peer1.org3.example.com
WARNING: Volume net_peer1.org3.example.com not found.
d2978de47b60
30bde37b9283
eccc23cb6774
Untagged: dev-peer1.org2.example.com-mycc-1.0-26c2ef32838554aac4f7ad6f100aca865e87959c9a126e86d764c8d01f8346ab:latest
Deleted: sha256:533a6db1467da2888f3fbff3666920e450957fa6a95c23d6fb3839462d2e5ecf
Deleted: sha256:0b127d65857aa7fbe7d1bbfe098a041141bcc791f243f6ccfbec19f0bb2cb324
Deleted: sha256:1e0be3d2fc236f8e568a116be14705c3b41fc0330e3653cfba8b25bfd9e3b702
Deleted: sha256:142c050eac5fb3c21f5dab6536c3ea7a3d96eaab314ba22819a1ba4cfbe00066
Untagged: dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9:latest
Deleted: sha256:cb6aec8062eb1a02d5f698fbea4fb53a1b4115c75d1a4968a490b9246613cb05
Deleted: sha256:52a7dccd290a2c1e05c3b6faa8cb70030fe9e7588baa6291cdc0c0b8587de159
Deleted: sha256:efc19260ba27dbb9f117a33ce615dfb9da1e7c5d5a1637002b61d91b6c788cf4
Deleted: sha256:0b86ec02d55b1029ff171fa52ea7340afe22d6f4ff18edfbdc77f95ff0cfe08b
Untagged: dev-peer0.org2.example.com-mycc-1.0-15b571b3ce849066b7ec74497da3b27e54e0df1345daff3951b94245ce09c42b:latest
Deleted: sha256:15b4e2d6ebddb10bce3e2b3fdc9948c68b7de567f3a35d9c25bf5da0dc78b9c1
Deleted: sha256:f732302d2be7f49c8d8dcce1c8e866cfd100d7548db07c35dacf78cedc33ebd7
Deleted: sha256:ff0a6362b69c5f1b07192690800049f1e6f728d635a3be3ede54b0fbfe4736d4
Deleted: sha256:655f67c3288e29d6ebda1fb2d0dec9c018602eb33af32de247f2f7f501b90dfe

至此,我们通过官方提供的first-network快速地构建了一个hyperledger fabric网络,也算是尝了鲜!万里长征,我们跨出了第一步,但是革命尚未成功,我们还需继续努力!加油!

参考:

  1. 搭建HyperLedger Fabric1.2.0开发环境
  2. Hyperledger Fabric环境搭建
  3. centos7安装配置Hyperledger fabric1.4.0
  4. Building Your First Network

搭建Hyperledger Fabric网络相关推荐

  1. hyperledger fabric 网络操作基本操作和概念

    hyperledger fabric 网络操作基本操作和概念 hyperledger fabric 网络操作基本操作和概念 1. cryptogen 操作 1.1 cryptogen 生成证书文件 1 ...

  2. (Fabric 超级账本学习【5】)Fabric2.4网络环境下——搭建Hyperledger Fabric区块链浏览器

    博主最近在搭建Hyperledger Fabric区块链浏览器过程中也学习了很多博主的搭建流程,踩了很多雷,踩 了很多坑,现将成功搭建好的Hyperledger Fabric区块链浏览器详细流程分享如 ...

  3. Hyperledger Fabric网络环境手动配置及其链码自动化部署

    目录 5.1 网络环境的搭建 5.1.1 生成组织结构与身份证书 5.1.2 生成创世区块和通道 5.1.3 启动Fabric网络 5.1.4  创建Fabric-SDK-GO对象并建立通道 5.1. ...

  4. 在一台Ubuntu计算机上构建Hyperledger Fabric网络

    在一台Ubuntu计算机上构建Hyperledger Fabric网络 Hyperledger fabric是一个开源的区块链应用程序平台,为开发基于区块链的应用程序提供了一个起点.当我们提到Hype ...

  5. Linux搭建Hyperledger Fabric区块链框架 - Hyperledger Fabric模型概念

    企业选型的区块链底层技术 Hyperledger Fabric 概念 2015年,Linux基金会启动了Hyperledger项目,目标是发展跨行业的区块链技术. Hyperledger Fabric ...

  6. zookeeper 虚拟机搭建好后 外部链接不上_Ubuntu Server搭建Hyperledger Fabric 2.1学习环境...

    最近在学习Hyperledger Fabric,它是由 Linux 基金会发起创建的开源区块链分布式账本. Hyperledger Fabric是一个开源区块链实现,开发环境建立在 VirtualBo ...

  7. ubuntu18.04 快速搭建 Hyperledger Fabric超级账本框架

    这两天一直再配Hyperledger Fabric1.4的环境,找了很多资料,期间因为墙的原因找了很多博客的解决办法终于搭建成果,特此记录下来避免以后搭建出错. 文章目录 环境 步骤 1. ubunt ...

  8. 基于Debian搭建Hyperledger Fabric 2.4开发环境及运行简单案例

    前言 在基于truffle框架实现以太坊公开拍卖智能合约中我们已经实现了以太坊智能合约的编写及部署,但其工作方式注定其只能应用于有限的业务场景中.相比之下,基于超级账本的Fabric具有高可扩展性和高 ...

  9. Hyperledger Fabric 网络环境的一点理解

    Hyperledger Fabric 开发链码,一般都是测试网络开发,然后部署到生产网络. 下面介绍测试网络.生产网络的一点理解. 1 测试网络 使用cryptogen等工具建立测试网络,开发环境使用 ...

最新文章

  1. PHP (20140519)
  2. python matlab大数据,Python第八课:Python数据分析基础
  3. matlab——图像细化
  4. android cpu负载 工具,计算Android中进程的CPU使用率
  5. Unity3d发布web版无法连接数据库
  6. 【ElasticSearch 学习笔记】Java API
  7. html判断安装没安装qq,QQ提示安装路径无效您没有权限怎么办 QQ2015提示安装路径无效您没有权限的解决方法...
  8. 美国g口无限流量服务器,不是所有的G口服务器都独享不限流量,美国SK洛杉矶G口除外...
  9. 系统分析与设计方法---结构化分析与设计
  10. Windows7不停弹出计算机界面,拨号连接自动弹出,教您如何解决电脑总是自动弹出...
  11. CentOs7 docker部署face_recognition
  12. 混沌系统matlab程序,dynamos混沌系统的追踪控制matlab代码
  13. BiliBili 扭蛋机
  14. 自动作文评分算法概述
  15. 接口测试中Post方法怎么测?
  16. 用matlab实现熵权法,熵权法原理及matlab代码实现
  17. DrGraph - 新起点
  18. 重磅!华为宣布起诉美国政府
  19. 2020知道答案C语言,C语言及逆向2020知到答案
  20. 学习廖雪峰Git入门教程--总结

热门文章

  1. python单元测试教程_python单元测试unittest 输出测试报告HTMLTestRunner
  2. 高并发编程-Thread#join方法的使用及使用场景分析
  3. MySql数据库命令大全:数据库操作命令,表操作命令,修改表结构命令,数据操作命令,数据查询操作命令
  4. 朝花夕拾——Sql语句
  5. 行走的历程(幸福指数)
  6. 晨会如何更好的描述自己的工作
  7. 厉害了!用“Pandas”现在也可以绘制交互式的图形了!
  8. 关于学好asp及asp.net的经历
  9. React通过url传参和通过路由传参
  10. Android paypal支付 集成 Manifest merger failed with multiple errors, see logs