转:ubuntu16.04 安装 go
1,下载go安装包
wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
2,解压 sudo tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz
3,配置环境变量
vim /etc/profile
添加:
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
export GOPATH=/opt/go
export PATH=$PATH:/opt/go/bin
保存,:x
source /etc/profile
4,检查
go version