安装 gopm 及 beego

安装 gopm, 使用说明

1
go get -v -u github.com/gpmgo/gopm

安装 beego 和 bee

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
192:~ rex$ gopm get -g -v github.com/astaxie/beego
[GOPM] 04-19 23:52:03 [ INFO] App Version: 0.8.8.0307 Beta
[GOPM] 04-19 23:52:03 [ INFO] Local repository path: /Users/rex/.gopm/repos
[GOPM] 04-19 23:52:03 [ INFO] Indicated GOPATH: /Users/rex/go
[GOPM] 04-19 23:52:03 [ INFO] /Users/rex/.gopm/repos/github.com/astaxie/beego
[GOPM] 04-19 23:52:03 [DEBUG] Skipped installed package: github.com/astaxie/[email protected]:<UTD>
[GOPM] 04-19 23:52:03 [ INFO] Package copied to GOPATH: github.com/astaxie/beego
[GOPM] 04-19 23:52:03 [ INFO] 0 package(s) downloaded, 0 failed
192:~ rex$
192:~ rex$
192:~ rex$
192:~ rex$ gopm get -g -v github.com/beego/bee
[GOPM] 04-19 23:52:34 [ INFO] App Version: 0.8.8.0307 Beta
[GOPM] 04-19 23:52:34 [ INFO] Local repository path: /Users/rex/.gopm/repos
[GOPM] 04-19 23:52:34 [ INFO] Indicated GOPATH: /Users/rex/go
[GOPM] 04-19 23:52:34 [ INFO] /Users/rex/.gopm/repos/github.com/beego/bee
[GOPM] 04-19 23:52:34 [DEBUG] Skipped installed package: github.com/beego/[email protected]:<UTD>
[GOPM] 04-19 23:52:34 [ INFO] Package copied to GOPATH: github.com/beego/bee
[GOPM] 04-19 23:52:34 [ INFO] 0 package(s) downloaded, 0 failed
192:~ rex$
192:~ rex$
192:~ rex$ go get github.com/astaxie/beego
192:~ rex$ go get github.com/beego/bee
192:~ rex$

尝试下 bee 命令,若没有,则需要将 bee 加入环境变量。

在 go 的 src 下面新建 rexyan 文件夹,并在终端中切换到该文件夹,执行以下命令创建一个 beego 的项目,名称为 blog。

1
bee new blog

进入 blog 目录,启动项目

1
bee run