工具包:
-fabric1.4.4,docker以及pbft工具包百度云链接
链接:https://pan.baidu.com/s/1hshTuQXyFlZA0xeiFF-fwQ
提取码:8888
Go安装
先解压安装包:
tar -xf go1.15.linux-amd64.tar.gz
将解压包移到安装路径:
mv go /usr/local
创建工作目录:
mkdir /usr/local/gopath
mkdir -p /usr/local/gopath/src/github.com/hyperledger/
cd /home/mima00
chmod -R 777 go
配置环境:
gedit ~/.bashrc
在最后添加以下内容:
export PATH=$PATH:/usr/local/go/bin
export GOPATH=/usr/local/gopath
export GOROOT=/usr/local/go
export GOBIN=$GOROOT/bin
更新:
source ~/.bashrc
查看:
go env
GO 包安装:
mkdir -p $GOPATH/src/golang/x
cd $GOPATH/src/golang/x
chmod -R 777 golang
下载需要的包:
修改代理:
go env -w GO111MODULE=on
go env -w GOPRIVATE=*.corp.example.com
go env -w GOPROXY=https://goproxy.cn,direct
(若设置失败可以多个逗号相隔或者先 unset GOPROXY)
例如:(go get的安装,若不是http地址则寻找的路径默认是$GOROOT)
git clone https://github.com/golang/tools.git
go get golang/x/tools/go/packages