参考了这篇文章 https://www.cnblogs.com/chenchao1990/p/6953223.html
go下载地址 https://golang.google.cn/dl/
编译安装
设置软连接
ln -s /u01/go-1.15.7/ /u01/go
设置环境变量
[root@V-209202 go-pro]# cat /root/.bashrc | grep -A10 go
### define go env
export GOROOT=/u01/go
export GOPATH=/u01/go-path
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
[root@V-209202 go-pro]# source /root/.bashrc
网友评论