centos7.3下简单暴力的fabric安装。

root用户登录:

curl -sSL https://get.docker.com/ | sh  #因为网络原因可能出错,重新执行一(N)遍
curl -L https://github.com/docker/compose/releases/download/1.14.0-rc2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
tar xvzf go1.8.3.linux-amd64.tar.gz
mv go /usr/local

systemctl start docker
ps -ef|grep docker

mkdir -p /root/fabric/src/github.com/hyperledger
vi .bash_profile   #PATH 添加 /root/fabric/bin  GOPATH=/root/fabric  export GOPATH

yum install -y git bzip2 gcc gcc-c++ libtool libltdl-dev libtool-ltdl-devel openssl #不一定需要安装这么多

cd /root/fabric/src/github.com/hyperledger
git clone https://github.com/hyperledger/fabric.git
git clone https://github.com/hyperledger/fabric-ca.git

#以下为安装从某些网站上看到的,别问我为什么,我也不知道为什么!
go get -u github.com/gpmgo/gopm
gopm get -g -d golang.org/x/tools/cover
gopm get -g -d github.com/axw/gocov/gocov
go install github.com/axw/gocov/gocov
gopm get -g -d github.com/AlekSi/gocov-xml
go install github.com/AlekSi/gocov-xml
gopm get -g -d github.com/golang/protobuf/protoc-gen-go
go install github.com/golang/protobuf/protoc-gen-go

cd /root/fabric/src/github.com/hyperledger/fabric
make docker #因为网络原因可能出错,重新执行一(N)遍
#出错的情况下执行:
cp $GOPATH/bin/protoc-gen-go $GOPATH/src/github.com/hyperledger/fabric/build/docker/gotools/bin/
cp $GOPATH/bin/gocov $GOPATH/src/github.com/hyperledger/fabric/build/docker/gotools/bin/
make docker
cd /root/fabric/src/github.com/hyperledger/fabric-ca
make docker

下载源码并编译node6.11:
configure && make && make install

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享