Installing Golang
- Download the Go installation package.
1wget https://gomirrors.org/dl/go/go1.15.14.linux-arm64.tar.gz - Decompress the package and create a soft link.
1 2
tar -zxf go1.15.14.linux-arm64.tar.gz -C /usr/local ln -s /usr/local/go/bin/go /usr/bin/go
- Configure the environment variables.
1vim /etc/profile1 2 3
unset -f pathmunge export TERM=xterm export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
source /etc/profile
- Disable the module management function of Go.
1go env -w GO111MODULE=off
The vendor directory of the Kapacitor source package contains required dependencies. Therefore, the module management function of Go is not required.
Kapacitor does not manage dependencies through the module management function of Go. Therefore, set the GO environment variable GO111MODULE to off.
- Set the Go environment variables.
1 2
go env -w GOPROXY=https://goproxy.cn go env -w GOROOT="/usr/local/go"
- View the version.
1go version
Parent topic: Installing Dependencies