我要评分
获取效率
正确性
完整性
易理解

Installing Golang

  1. Download the Go installation package.
    1
    wget https://gomirrors.org/dl/go/go1.15.14.linux-arm64.tar.gz
    
  2. 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
    
  3. Configure the environment variables.
    1
    vim /etc/profile
    
    1
    2
    3
    unset -f pathmunge
    export TERM=xterm
    export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
    
    source /etc/profile
  4. Disable the module management function of Go.
    1
    go 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.

  5. Set the Go environment variables.
    1
    2
    go env -w GOPROXY=https://goproxy.cn
    go env -w GOROOT="/usr/local/go"
    
  6. View the version.
    1
    go version