下载GO
wget https://gomirrors.org/dl/go/go1.17.2.linux-amd64.tar.gz
解压到/usr/local目录下
wget https://gomirrors.org/dl/go/go1.17.2.linux-amd64.tar.gz
修改用户配置 vi /etc/profile.d/customer.sh
export GOPROXY=https://goproxy.io,direct
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
使配置生效
source /etc/profile
查看go版本
go version
查看go环境配置
go env