gvnt1.1 安装C编译器yum install gcc gcc-c++ kernel-devel -y1.2 验证GCC是否安装成功gcc --version1.3 安装Go编译器(版本大于1.9)yum install golang -y查看Go编译器版本
go version1.4 配置Go编译器环境1.4.1 使用vim编辑/etc/profile文件
vim /etc/profile在/etc/profile文件末尾添加以下配置,输入 :wq保存
#golang env config
export GOROOT=/usr/lib/golang
export GOPATH=/home/gopath
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin1.4.2 切换到/home目录,并创建gopath文件夹,后面开发和编译过程中用go get安装第三方包会用到
cd /home
mkdir gopath1.4.3 使换将变量配置生效
source /etc/profile1.4.4 设置代理环境变量,再拉去golang.org的时候就不需要墙了。注意GO1.13之后才支持direct的写法
go env -w GOPROXY=https://goproxy.cn,direct1.4.5 设置完后用 go env 查看
2 安装Gvntgo-vnt$GOPATH/src/github.com/vntchainmkdir -p $GOPATH/src/github.com/vntchain
cd $GOPATH/src/github.com/vntchain
git clone https://github.com/vntchain/go-vnt
cd go-vnt如果有以前的版本,请更新到最新:
git pullgvntmake gvntgvntmake all$GOPATH/src/github.com/vntchain/go-vnt/build/bin/gvntgvnt$GOPATH/bingo install -v ./cmd/gvnt2.4 查看当前使用的gvnt版本号
gvnt version
参考链接:
1.vntchain/go-vnt
2.https://www.cnblogs.com/nickchou/p/10934025.html
3.https://www.cnblogs.com/wswind/p/13840922.html