Brief introduction
There are several times before because of environmental variables set lost some time, especially in this record keeping
Installation golang
-
Refer to the official Started the Getting , but sometimes there are problems.
-
Decompression
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
- Environment Variables
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/home/zhangjun/go export PATH=$PATH:$GOROOT/bin
Installation beego
- go get installed
go get github.com/astaxie/beego
go get github.com/beego/bee
- Environment Variables
export GOPATH=/home/zhangjun/work
export PATH=$PATH:$GOPATH/bin
bee new 文件名 必须在$GOPATH/src下才能生效