1、下载源码包:go1.7rc3.linux-amd64.tar.gz

2、将下载的源码包解压至 /usr/local目录。

<pre class="prettyprint prettyprinted" style="margin: 0px; padding: 0px; white-space: pre-wrap; overflow-wrap: break-word; color: rgb(51, 51, 51); font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">tar -C /usr/local -xzf go1.7rc3.linux-amd64.tar.gz</pre>

3、将 /usr/local/go/bin 目录添加至PATH环境变量:

vim /etc/profile

export GOROOT=/opt/go #设置为go安装的路径
export GOPATH=/code/goDemo #默认安装包的路径
export PATH=PATH:GOROOT/bin:$GOPATH/bin

source /etc/profile

4、查看版本信息

go$GOPATHGOPATH;:GOPATH时go get$GOPATH
srcpkgbin

      每天坚持学习1小时Go语言,大家加油,我是彬哥,下期见!如果文章中不同观点、意见请文章下留言或者关注下方订阅号反馈!

社区交流群:221273219
Golang语言社区论坛 :
www.Golang.Ltd
LollipopGo游戏服务器地址:
https://github.com/Golangltd/LollipopGo
社区视频课程课件GIT地址:
https://github.com/Golangltd/codeclass