下载
wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz –no-check-certificate
进入安装目录并解压:
cd /usr/local/ && tar zxf /root/go1.8.3.linux-amd64.tar.gz
修改环境变量
vim .bash_profile
export GOROOT=/usr/local/go
export GOPATH=/workspace/golang
PATH=”.:$PATH:$GOROOT/bin:$GOPATH/bin”
使环境变量生效
source .bash_profile
检测
go version
go version go1.8.3 linux/amd64