alias ls='ls --color=auto'
alias grep='grep --color=auto'
wget https://go.dev/dl/go1.22.9.linux-amd64.tar.gz
export GOROOT_BOOTSTRAP=/root/test/go/
wget https://go.dev/dl/go1.23.3.src.tar.gz
$ cd go/src/
$ ./make.bash
Building Go cmd/dist using /root/test/go/. (go1.22.9 linux/amd64)
Building Go toolchain1 using /root/test/go/.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for linux/amd64.
---
Installed Go for linux/amd64 in /root/go
Installed commands in /root/go/bin
*** You need to add /root/go/bin to your PATH.
~/.bashrc
export GOROOT=/usr/local/go1.23.3
export GOPATH=/root/go
export PATH=$PATH:$GOROOT/bin
export GOOS=linux
export GOARCH=amd64
go env -w GOPROXY=https://goproxy.cn,direct