Go study notes: Installation under Linux Go Language

CentOS7.6 install Go-1.12.9 version

1. Download the installation package to the current directory
> wget https://dl.google.com/go/go1.12.9.linux-amd64.tar.gz
2. extract to the specified directory
> tar -C / usr / local - go1.12.9.linux-amd64.tar.gz xzvf
<description> after decompression is successful, go to generate directory under / usr / local directory, i.e., go to the installation path is / usr / local / go.
3. Add / usr / local / go / bin to your PATH environment variable (requires root privileges)
> vim / etc / Profile
** Add the following to the end of the file:
Export PATH = $ PATH: / usr / local / go / bin
* * let profile take effect immediately
> Source / etc / profile
4. Check the version information go
# go version
go version go1.12.9 Linux / AMD64
# go commands use the help
> help go
# to view the environment variable information go
> go env

 

Reference

Golang Chinese official website https://golang.google.cn

GitHub golang project home https://github.com/golang/go

 

Guess you like

Origin www.cnblogs.com/yunfan1024/p/11418918.html