Golang Install
1. Download go1.8.3
First,download The Go program from the site:
Https://dl.google.com/go/go1.8.3.linux-amd64.tar.gz
2. Install into dir
TAR-XVF go1.8.3.linux-amd64.tar.gz-c/usr/local/
3. Configure the Golang
(1) Add the following lines to profile (/etc/profile)
# vim/etc/profile
# # #GOLANG env###
export goroot=/usr/local/go
export path= $PATH: $GOROOT/bin: $GOPATH/ Bin
(2) Add the following line into BASHRC (Vim ~/.BASHRC)
# vim ~/.BASHRC
# # #GO env###
Export gopath=/home/golang/
(3) Make it effect
# source/etc/profile
# source ~/.BASHRC
(4) Test go
# Go version
go version go1.8.3 linux/amd64
# Go env
goarch= "AMD64"
gobin= ""
goexe= ""
Gohostarch= "AMD64"
gohostos= "Linux"
goos= "Linux"
gopath= "/home/golang/"
gorace=
"goroot= "/usr/local/go"
gotooldir= "/usr/local/go/pkg/tool/linux_amd64"
gccgo= "Gccgo"
cc= "gcc"
Gogccflags= "-fpic-m64-pthread-fmessage-length=0-fdebug-prefix-map=/tmp/go-build495537484=/tmp/go-build- Gno-record-gcc-switches "
cxx=" g++ "
cgo_enabled=" 1 "
pkg_config=" Pkg-config "
cgo_cflags="-G- O2 "
cgo_cppflags=" "
cgo_cxxflags="-g-o2 "
cgo_fflags="-g-o2 "
cgo_ldflags="-g-o2 "