wget https://dl.google.com/go/go1.17.1.linux-amd64.tar.gz
tar -zxvf xxx
vim /etc/profile
添加
export GOROOT=/golang/go
export GOPATH=/golang/gopath
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
source /etc/profile
go version
wget https://dl.google.com/go/go1.17.1.linux-amd64.tar.gz
tar -zxvf xxx
vim /etc/profile
添加
export GOROOT=/golang/go
export GOPATH=/golang/gopath
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
source /etc/profile
go version