This is a creation in Article, where the information may have evolved or changed.
Recently suddenly want to understand the go language, as a phper I think, I not only to stand at present, but also to stand as far as possible in the future.
Nonsense not table, start the installation.
1. Download and install the website: https://golang.org/dl/is selected in the system version.
can also be directly with me to write the following: (see other people's articles, I also like this batch of brain-free orders haha)
cd /usr/local/srcwget https://dl.google.com/go/go1.10.linux-amd64.tar.gztar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
2. Environment configuration: After the installation of your/usr/local will add a go directory, this is your go to the installation directory. Now start adding environment variables.
1) Edit File Vim/etc/profile
2) Add the following at the bottom:
export GOROOT=/usr/local/go#gopath 是指你的go语言项目的工作空间。 我定义为¥HOME下的work,你也可以根据你的习惯改动。export GOPATH=$HOME/workexport GOBIN=$GOROOT/binexport PATH=$PATH:$GOBIN:$GOPATH
When you are finished editing, save the file. Input. /etc/profile to perform the changes.
3. Enter the Go Env view config variable or go version to see the revision number. My display is: Go version go1.10 linux/amd64
4. Basic Grammar Concept Learning: HTTP://GO-TOUR-ZH.APPSPOT.COM/WELCOME/1 (may require scientific access to Internet means ~ ~ ~)
All right, the first one is here to end first. Just starting to get started. I hope you'll correct me.
The second article does not know how long to wait, because I also just started ....
Original link: Go Language learning Tour (i) installation under CentOS
299 reads ∙1 likes