1, download golang1.4 and 1.10 source code (1.4 later versions are installed with 1.4go compilation, so first install 1.4)
2, after the decompression of my directory structure is:
/opt/xxx/golang
|-------Gopath//Development working directory
| |------src//Development source
| |------PKG
| |------bin//Development source Go install the executable file
'-------src//golang source code
|-------go-1-10
| |----------Go
| | |----------Bin
| | |----------src
| | |----------Lib
| | |---------- . . . .
| |----------go1.10.1.src.tar.gz
|-------go-1-4
| |-----Go
| | |----------Bin
| | |----------src
| | |----------Lib
| | |---------- . . . .
| |-----go1.4.3.src.tar.gz
3, configure environment variables, my environment variable configuration:
#golang Path
Export goroot=/opt/xxx/golang/src/go-1-10/go/
Export gobin= $GOPATH/bin
Export Gopath=/opt/xxx/golang/gopath
Export path= $PATH: $GOROOT/bin: $GOBIN: $GOPATH
4. Running/opt/xxx/golang/src/go-1-4/go/src/all.bash
5. Running/opt/xxx/golang/src/go-1-10/go/src/cat all.bash\
At present, we are ready to improve
Golang Linux under Build environment