Rate This Document
Findability
Accuracy
Completeness
Readability

Preparing the Hoverfly Compilation Environment

  1. Configure Go environment variables.
    1. Open the /etc/profile file.
      1
      vi /etc/profile
      
    2. Add the following content to the file. Save the file and exit.
      export GOPATH=/root/go;
      export GOROOT=/usr/lib/golang;
      export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
    3. Make the modified environment variables take effect.
      1
      source /etc/profile
      
  2. Install Gox, Logrus, GOPROXY and Glide.
    1
    git config --global http.sslVerify false
    
    1
    go get github.com/mitchellh/gox;
    
    1
    go get github.com/Sirupsen/logrus;
    
    1
    go get github.com/rusenask/goproxy;
    
    1
    go get github.com/Masterminds/glide;
    

    During the installation, if an error is reported stating "unrecognized import path 'golang.org/x/sys/unix'", see Configuring GOPROXY Environment Variables.

  3. View the Glide version.
    glide -v

    If the command output contains the error "command not found", run the reboot command to reboot the server.

  4. Modify the Git configuration file.
    1. Open the ~/.gitconfig file.
      1
      vi ~/.gitconfig
      
    2. Replace configured URLs with the new ones. Save the configuration and exit.
      [url "https://gitlab.com/cznic/cc.git"]
      insteadOf = https://gitlab.com/cznic/cc
      [url "https://gitlab.com/cznic/golex.git"]
              insteadOf = https://gitlab.com/cznic/golex 
      [url "https://gitlab.com/cznic/mathutil.git"]
              insteadOf = https://gitlab.com/cznic/mathutil
      [url "https://gitlab.com/cznic/strutil.git"]
              insteadOf = https://gitlab.com/cznic/strutil
      [url "https://gitlab.com/cznic/xc.git"]
              insteadOf = https://gitlab.com/cznic/xc