1.下载go
wget https://dl.google.com/go/go1.13.7.linux-amd64.tar.gz
2.解压go
tar zxvf go1.13.7.linux-amd64.tar.gz
3.添加go目录到环境变量中
vi ~/.bashrc
4.末尾添加
export GOROOT=/data/go
export PATH=$PATH:$GOROOT/bin
5.刷新配置
source ~/.bashrc
6.验证go是否安装成功
go version