This is a creation in Article, where the information may have evolved or changed.
Linux (CentOS redhat) installation
1. Access to the official address:
https://golang.org/dl/# #由于相关ZC你懂的, better be able to turn down the wall
2. Download the 64-bit Green pack:
Https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
3. After the download is complete:
Assume that you want to install the GO directory as $GO _install_dir, followed by the corresponding directory path.
Unzip the tar.gz package into the installation directory: Tar zxvf go1.8.3.linux-amd64.tar.gz-c $GO _install_dir.
4. Add the environment variable vim/etc/profile, adding the following lines
Export path= $PATH: $GO _install_dir/go/bin
Export goroot= $GO _install_dir/go
Export gobin= $GOROOT/bin
Export gopath= $GO _install_dir/go/data # #注意 $GO _install_dir for your GO install or unzip directory
Then execute go
#go
Go is a tool for managing go source code.
Usage:
Go command [arguments]
The commands are:
Build compile packages and dependencies
Clean Remove object files
Doc show documentation for package or symbol
ENV Print Go Environment information
Bug Start a bug report
Fix run Go tool fix on packages
FMT run GOFMT on package sources
Generate generate Go files by processing source
Get download and install packages and dependencies
Install compile and install packages and dependencies
List List Packages
Run compile and run Go program
Test test Packages
Tool run specified Go tool
Version Print Go version
Vet Run Go tool vet on packages
Use the "Go help [command]" For more information about a command.
Additional Help Topics:
C Calling between Go and C
Buildmode Description of Build modes
filetype file types
Gopath gopath environment variable
Environment Environment variables
Importpath Import Path syntax
Packages description of the package lists
Testflag Description of testing flags
TestFunc Description of testing functions
Use ' Go help [topic] ' For more information on that topic.
See the above information to show that the go environment has been built up
But use: Go version to see the release of Go