# hyperledger-fabric-linux **Repository Path**: gukedi/hyperledger-fabric-linux ## Basic Information - **Project Name**: hyperledger-fabric-linux - **Description**: A easy setup for Hyperledger Fabric in Linux - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-29 - **Last Updated**: 2021-11-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # hyperledger-fabric-linux #### 介绍 A easy setup for Hyperledger Fabric in Linux(Centos7.9) #### Toolkit 1. git: yum install git 2. docker: yum install docker 3. go1.16.7: wget https://gomirrors.org/dl/go/go1.16.7.linux-amd64.tar.gz or 访问 [gomirrors.org](https://gomirrors.org/) #### 安装教程 ONLY applicable to LINUX 1. git clone https://gitee.com/gukedi/hyperledger-fabric-linux.git 2. cd hyperledger-fabric-linux 3. chmod 755 bootstrap.sh && ./bootstrap.sh 4. add go/bin and fabric-samples/bin into PATH vi ~/.bash_profile ``` PATH=$PATH:$HOME/bin:/root/go/bin:/root/hyperledger-fabric-linux/fabric-samples/bin export PATH # start docker service service docker start # add go proxy export GOPROXY=https://goproxy.io,direct ``` 5. disable selinux(也可以逐个打开对应端口权限) vi /etc/selinux/config ``` SELINUX=disabled ``` 6. reboot 7. start test network [官方文档](https://hyperledger-fabric.readthedocs.io/zh_CN/release-2.2/test_network.html) after login, ``` cd ~/hyperledger-fabric-linux/fabric-samples/test-network ./network.sh up ``` #### 使用说明 参照官方bootstrap.sh修改而来,主要是解决github下载过慢的问题。 主要修改点: 1. fabric-samples 替换为 gitee 3. 预置两个fabric binaries. #### 支持版本 fabric:2.3.2 CA:1.5.1 #### LOG like this(centos7): ``` Clone hyperledger/fabric-samples repo ===> Cloning hyperledger/fabric-samples repo Cloning into 'fabric-samples'... remote: Enumerating objects: 42, done. remote: Counting objects: 100% (42/42), done. remote: Compressing objects: 100% (32/32), done. remote: Total 7688 (delta 15), reused 31 (delta 9), pack-reused 7646 Receiving objects: 100% (7688/7688), 4.53 MiB | 0 bytes/s, done. Resolving deltas: 100% (3973/3973), done. fabric-samples v2.3.2 does not exist, defaulting to main. fabric-samples main branch is intended to work with recent versions of fabric. Pull Hyperledger Fabric binaries ===> Decompressing binary file: /root/hyperledger-fabric-linux/hyperledger-fabric-linux-amd64-2.3.2.tar bin/ bin/configtxlator bin/discover bin/orderer bin/cryptogen bin/configtxgen bin/idemixgen bin/osnadmin bin/peer config/ config/configtx.yaml config/core.yaml config/orderer.yaml ==> Done. ===> Decompressing binary file: /root/hyperledger-fabric-linux/hyperledger-fabric-ca-linux-amd64-1.5.1.tar bin/ bin/fabric-ca-client bin/fabric-ca-server ==> Done. Pull Hyperledger Fabric docker images FABRIC_IMAGES: peer orderer ccenv tools baseos ===> Pulling fabric Images ====> hyperledger/fabric-peer:2.3.2 Trying to pull repository docker.io/hyperledger/fabric-peer ... 2.3.2: Pulling from docker.io/hyperledger/fabric-peer 339de151aab4: Pull complete b4bf7ae190fe: Pull complete 10fe799bdafa: Pull complete 15f2887b5ef0: Pull complete a13b95531ea2: Pull complete e7da33d025ba: Pull complete Digest: sha256:f39281832923fc98695e3aebd998619e4ad3eec5acb861d2636a9be296b519d8 Status: Downloaded newer image for docker.io/hyperledger/fabric-peer:2.3.2 ====> hyperledger/fabric-orderer:2.3.2 Trying to pull repository docker.io/hyperledger/fabric-orderer ... 2.3.2: Pulling from docker.io/hyperledger/fabric-orderer 339de151aab4: Already exists b4bf7ae190fe: Already exists ed8a60a97f32: Pull complete 449433bcd453: Pull complete 3043f4effeca: Pull complete 9ea245af5804: Pull complete 36869231524e: Pull complete Digest: sha256:50f2c36e5d11a5ae9b266cf062299e538a0f5e95289b736f3c16108697a7bb13 Status: Downloaded newer image for docker.io/hyperledger/fabric-orderer:2.3.2 ====> hyperledger/fabric-ccenv:2.3.2 Trying to pull repository docker.io/hyperledger/fabric-ccenv ... 2.3.2: Pulling from docker.io/hyperledger/fabric-ccenv 801bfaa63ef2: Pull complete ee0a1ba97153: Pull complete 1db7f31c0ee6: Pull complete 8142a84142b8: Pull complete f9a026f75f34: Pull complete 2b20f10e9844: Pull complete 10c0d16c0be6: Pull complete c80a0dd15bbb: Pull complete 953df74e5297: Pull complete Digest: sha256:08322a64b8d9789458d7f059d8c9e4a1fcdaf115ef04e5b5812aab5b34b5c264 Status: Downloaded newer image for docker.io/hyperledger/fabric-ccenv:2.3.2 ====> hyperledger/fabric-tools:2.3.2 Trying to pull repository docker.io/hyperledger/fabric-tools ... 2.3.2: Pulling from docker.io/hyperledger/fabric-tools 4c0d98bf9879: Pull complete 9e181322f1e7: Pull complete 6422294da7d3: Pull complete 8b36f00a8e74: Pull complete 5e5ebcc3e852: Pull complete f1a92af8bce7: Pull complete af6d90c79214: Pull complete 887182524f3b: Pull complete Digest: sha256:00cbe11e72845724d50758c8ba4d3a8e674f0241490ca24251a8eb1dce96985a Status: Downloaded newer image for docker.io/hyperledger/fabric-tools:2.3.2 ====> hyperledger/fabric-baseos:2.3.2 Trying to pull repository docker.io/hyperledger/fabric-baseos ... 2.3.2: Pulling from docker.io/hyperledger/fabric-baseos 339de151aab4: Already exists b4bf7ae190fe: Already exists 1ae7ad167f3b: Pull complete Digest: sha256:e3925478808ec334e3da7a5bf4ca5eb44b0b39e9134b5470b196a1c7d02f6ac7 Status: Downloaded newer image for docker.io/hyperledger/fabric-baseos:2.3.2 ===> Pulling fabric ca Image ====> hyperledger/fabric-ca:1.5.1 Trying to pull repository docker.io/hyperledger/fabric-ca ... 1.5.1: Pulling from docker.io/hyperledger/fabric-ca 540db60ca938: Pull complete b3a1964ad4c1: Pull complete c84039cab6dd: Pull complete Digest: sha256:c7f3422ec1d5fe5e5819563325f17a55d5e276cfed39ba51c5518c538de638a2 Status: Downloaded newer image for docker.io/hyperledger/fabric-ca:1.5.1 ===> List out hyperledger docker images docker.io/hyperledger/fabric-ca 1.5.1 c6803b1828da 11 days ago 70.8 MB hyperledger/fabric-ca 1.5 c6803b1828da 11 days ago 70.8 MB hyperledger/fabric-ca latest c6803b1828da 11 days ago 70.8 MB docker.io/hyperledger/fabric-tools 2.3.2 a206a1593b4c 4 months ago 448 MB hyperledger/fabric-tools 2.3 a206a1593b4c 4 months ago 448 MB hyperledger/fabric-tools latest a206a1593b4c 4 months ago 448 MB docker.io/hyperledger/fabric-peer 2.3.2 85c825d4769f 4 months ago 54.2 MB hyperledger/fabric-peer 2.3 85c825d4769f 4 months ago 54.2 MB hyperledger/fabric-peer latest 85c825d4769f 4 months ago 54.2 MB hyperledger/fabric-orderer 2.3 7cad713cbfea 4 months ago 37.8 MB hyperledger/fabric-orderer latest 7cad713cbfea 4 months ago 37.8 MB docker.io/hyperledger/fabric-orderer 2.3.2 7cad713cbfea 4 months ago 37.8 MB docker.io/hyperledger/fabric-ccenv 2.3.2 627c556b15ca 4 months ago 514 MB hyperledger/fabric-ccenv 2.3 627c556b15ca 4 months ago 514 MB hyperledger/fabric-ccenv latest 627c556b15ca 4 months ago 514 MB docker.io/hyperledger/fabric-baseos 2.3.2 e50ea411d694 4 months ago 6.86 MB hyperledger/fabric-baseos 2.3 e50ea411d694 4 months ago 6.86 MB hyperledger/fabric-baseos latest e50ea411d694 4 months ago 6.86 MB ```