1. 程式人生 > >Hyperledger Fabric快速上手

Hyperledger Fabric快速上手

mapper iss -s amd64 clone local -o mis ati

安裝go

curl -O https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz

tar -xvf go1.8.linux-amd64.tar.gz && mv go /usr/local

yum install -y libsnappy-dev zlib1g-dev libbz2-dev libltdl-dev libtool glibc-static libtool-ltdl-devel

修改環境變量:vi /etc/profile,完成後source /etc/profile

export GOROOT=/usr/local/go

export GOPATH=/go

export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

常用工具

go get github.com/golang/protobuf/protoc-gen-go \

&& go get github.com/kardianos/govendor \

&& go get github.com/golang/lint/golint \

&& go get golang.org/x/tools/cmd/goimports \

&& go get github.com/onsi/ginkgo/ginkgo \

&& go get github.com/client9/misspell/cmd/misspell \

&& go get github.com/AlekSi/gocov-xm

安裝docker和docker-compose

yum install -y yum-utils device-mapper-persistent-data lvm2

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

yum list docker-ce --showduplicates | sort -r

yum install docker-ce

docker run hello-world

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

獲取fabric和相關工具

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

cd $GOPATH/src/github.com/hyperledger

git clone

Hyperledger Fabric快速上手