1、go下载地址:https://studygolang.com/dl
2、解压缩到usr/local文件夹:sudo tar -zxvf go1.10.1.linux-amd64.tar.gz -C/usr/local
3、添加环境变量:vim /etc/profile
export GOROOT=/home/forward/tools/go
export PATH=$GOROOT/bin:$PATH
export GOPATH=/home/forward/tools/gopkg
GOPATH和GOROOT修改为你的路径即可
4、执行:source /etc/profile
5、执行:go version
查看版本号: