Install Go [STEP-1]

Install Go

  1. Login as root user 

  2. Go to the following link and download file

    https://golang.org/dl/

  3. Extract tar file to /usr/local directory

    tar -C /usr/local -xzf go1.13.4.linux-amd64.tar.gz

  4. Set the PATH and GOPATH in /root/.bash_profile 

          export PATH=$PATH:/usr/local/go/bin

          export GOPATH=/usr/local/go

      5. Execute following command.

          source /root/.bash_profile

          go

          Verify the output

[OPTIONAL]

      6.Verify Installation -Execute following commands

          1. Execute following to behave the GOPATH way even outside of GOPATH

                  go env -w GO111MODULE=off  

          2. cd /root


    3. vi hello.go #Add following content


      package main

      import "fmt"

      func main() {

      fmt.Printf("Hello, World..!!\n")

      }

         4. go build -o hello
         5. ./hello #Should display results
         6. Execute following to revert back
               go env -w GO111MODULE=auto


Follow the link for OPERATOR-SDK installation.............................

Comments

Popular posts from this blog

Install Operator-SDK on Linux-[STEP-2]

Creating a simple Web Operator using Operator SDK Ansible framework-[STEP-3]