安裝
beego 包含一些示例應(yīng)用程序以幫您學(xué)習(xí)并使用 beego 應(yīng)用框架敌蜂。
您需要安裝 Go 1.1+ 以確保所有功能的正常使用。
你需要安裝或者升級 Beego 和Bee的開發(fā)工具:
$ go get -u github.com/astaxie/beego
$ go get -u github.com/beego/bee
下面是安裝的時(shí)候出現(xiàn)的錯(cuò)誤
# cd .; git clone https://github.com/astaxie/beego /alidata/www/go_workspace/src/github.com/astaxie/beego
Initialized empty Git repository in /alidata/www/go_workspace/src/github.com/astaxie/beego/.git/
error:? while accessing https://github.com/astaxie/beego/info/refs
fatal: HTTP request failed
package github.com/astaxie/beego: exit status 128
如果在網(wǎng)絡(luò)上面都沒法解決广料,最笨的辦法就是下載源碼安裝,
下載鏈接:https://github.com/astaxie/beego
? ? ? ? ? ? ? ? ? https://github.com/beego/bee
把兩個(gè)源碼放在下面對應(yīng)的目錄
src/github.com/astaxie/beego/
src/github.com/beego/bee/
然后執(zhí)行命令:
go install github.com/astaxie/beego
go install src/github.com/beego/bee
創(chuàng)建項(xiàng)目如下:
/alidata/www/go_workspace/src/beego/bee
/alidata/www/go_workspace/src/github.com/astaxie/beego
/alidata/www/go_workspace/src/github.com/beego/bee
export GOROOT=/alidata/server/go
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOBIN
export GOPATH=/alidata/www/go_workspace/
go install? github.com/astaxie/beego
go install? github.com/beego/bee
nohup ./go_zhanj163 &