Hyperledger Fabric1.0.0搭建

系统环境:

  阿里云新装的Centos7.2

yum -y update
yum install -y openssl openssl-devel gcc gcc-c++ zlib zlib-devel lsof unzip yum-utils device-mapper-persistent-data
vim /etc/resolv.conf
#注释掉这行
#options timeout:2 attempts:3 rotate single-request-reopen

一 yum安装docker-ce

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce
systemctl enable docker
systemctl start docker
systemctl status docker

顺便开启了阿里云的docker镜像加速

二 安装docker-compose

curl -L https://github.com/docker/compose/releases/download/1.15.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

 

三 安装go

curl -O https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz
mkdir /root/go
vim /etc/profile
#最后面加上

export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
export GOPATH=/root/go
export PATH=$PATH:/root/go/bin

source /etc/profile

 

 

四 安装git

yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker

 

 

五 安装fabric docker镜像启动

mkdir -p /root/go/src/github.com/hyperledger
cd /root/go/src/github.com/hyperledger
git clone https://github.com/hyperledger/fabric.git
cd /root/go/src/github.com/hyperledger/fabric
git checkout v1.0.0
cd /root/go/src/github.com/hyperledger/fabric/examples/e2e_cli/
source download-dockerimages.sh -c x86_64-1.0.0 -f x86_64-1.0.0
./network_setup.sh up

 

 

docker exec -it cli bash
peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'
查看

 

参考地址1:https://blog.csdn.net/jambeau/article/details/78638129

参考地址2:https://blog.csdn.net/hefunuan123/article/details/77965768

参考地址3:https://www.cnblogs.com/jmaly/p/7722863.html

参考地址4:https://yq.aliyun.com/articles/238940

 

posted @ 2018-07-02 18:01  漫风满画楼  阅读(144)  评论(0编辑  收藏  举报