CentOS 7.1 上golang環境配置

1、下載和解壓go環境包linux

>>cd /usr/local/src/golang

>>wget -c http://golangtc.com/static/go/go1.4beta1.linux-amd64.tar.gzspa

>>tar zxvf go1.4beta1.linux-amd64.tar.gz -C /usr/localget


2、設置系統環境變量io

>>vi /etc/profile編譯

export GOROOT=/usr/local/go變量

export GOBIN=$GOROOT/bin配置

export PATH=$PATH:$GOBINfile

 

3、 編譯,使其生效下載

>>source /etc/profile


4、驗證,查看是否配置成功
>>go version

參考:

https://golang.org/doc/install#install

http://docscn.studygolang.com/doc/install#

http://studygolang.com/articles/1804

相關文章
相關標籤/搜索