1. wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
2. tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz
3.vim ~/.bashrc
export GOPATH=/opt/go
export GOROOT=/usr/local/go
export GOARCH=amd64
export GOOS=linux
export GOBIN=$GOROOT/bin/
export GOTOOLS=$GOROOT/pkg/tool/
export PATH=$PATH:$GOBIN:$GOTOOLS
4. source ~/.bashrc
5. go version
有疑问加站长微信联系(非本文作者)