Skip to content

Install Go ​

Use Go 1.23+. Download from: https://go.dev/dl/

Install by OS ​

Windows ​

  1. Download the .msi installer from the official website.
  2. Run the installer.
  3. Open CMD/PowerShell and verify:
bash
go version

macOS ​

  1. Download the .pkg installer from the official website.
  2. Run the installer.
  3. Verify in Terminal:
bash
go version

Linux ​

  1. Download the matching .tar.gz package.
  2. Extract to /usr/local:
bash
sudo tar -C /usr/local -xzf go*.tar.gz
  1. Add to PATH (~/.bashrc or ~/.zshrc):
bash
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
  1. Reload shell and verify:
bash
source ~/.bashrc
# or source ~/.zshrc
go version

Go Proxy (Optional) ​

If your network is slow, set GOPROXY:

bash
go env -w GOPROXY=https://goproxy.cn,direct
go env -w GOSUMDB=sum.golang.org
go env -w GO111MODULE=on

Check result:

bash
go env | grep GOPROXY

Next Step ​

Proceed to Service Deployment.

微信微信
商务咨询
微信二维码
QQQQ群
BBS-GO交流群
QQ二维码