安装go
# 下载二进制包 cd /usr/local/src/ wget https://golang.google.cn/dl/go1.17.5.linux-amd64.tar.gz tar xf go1.17.5.linux-amd64.tar.gz -C /usr/local/ # 加入环境变量 vim /etc/profile export GOROOT=/usr/local/go export PATH=$PATH:$GOROOT/bin # 当前shell生效 source /etc/profile # 验证 [root@jenkins bin]# go version go version go1.17.5 linux/amd64