go the installation environment

 

 

1) Linux installation

https://studygolang.com/dl

 

 

 

In ~ # create the folder under go, and go into the folder 
mkdir ~ / go && cd ~ / go 
download go archive 
wget HTTPS: // dl.google.com/go/go1.11.5.linux-amd64.tar .gz

Execution tarextract to /usr/loaclthe directory (the official recommended), get gofolders, etc.

tar -C /usr/local -zxvf  go1.11.5.linux-amd64.tar.gz

Add /usr/loacl/go/bindirectory to the PATH variable. Add to /etc/profile or $HOME/.profilecan

# Accustomed to using vim, if you can not use the command `sudo apt- GET install vim` install a 
vim / etc / Profile 
# Add the last line of 
Export GOROOT = / usr / local / Go 
Export the PATH = $ the PATH: $ GOROOT / bin 
# save and exit at source (vim to use their search can) 
source / etc / Profile

You can view the version of go go version

 

Guess you like

Origin www.cnblogs.com/xingxia/p/go_install.html