After installation go and beego environment variable settings

Brief introduction

There are several times before because of environmental variables set lost some time, especially in this record keeping

Installation golang

  1. Refer to the official Started the Getting , but sometimes there are problems.

  2. Decompression

tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
  1. Environment Variables
   export PATH=$PATH:/usr/local/go/bin
   export GOROOT=/home/zhangjun/go  export PATH=$PATH:$GOROOT/bin 

Installation beego

  1. go get installed
go get github.com/astaxie/beego
go get github.com/beego/bee
  1. Environment Variables
export GOPATH=/home/zhangjun/work
export PATH=$PATH:$GOPATH/bin

bee new 文件名 必须在$GOPATH/src下才能生效
 




Guess you like

Origin www.cnblogs.com/zhangxiaoj/p/11318744.html