For available downloads, please refer to the following; we’ll use one version as an example:
https://mirror.cnop.net/?dir=go
https://go.dev/dl/
Golang Environment Installation:
wget https://mirror.cnop.net/go/go1.19.1/go1.19.1.linux-amd64.tar.gz
tar zxvf go1.19.1.linux-amd64.tar.gz && mv go /usr/local/
Set Environment Variables:
vi /etc/profile # Append the following content at the end
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
source /etc/profile # Apply changes immediately
Check Version:
go version
