- apt-get update
- apt-get install git
- apt-get install golang
- apt-get install mysql-server
- 配置golang环境
- go get github.com/astaxie/beego
- go get github.com/beego/bee
- go get -u qiniupkg.com/api.v7
- go get github.com/go-sql-driver/mysql
- go get -u github.com/astaxie/beego/session/mysql
- go get github.com/golang-commonmark/markdown
- go get github.com/golang-commonmark/mdtool
- go get github.com/satori/go.uuid
- go get github.com/boombuler/barcode
- 创建village数据库
create database village CHARACTER SET utf8 COLLATE utf8_general_ci;
- 创建session mysql存储引擎表
CREATE TABLE `session` (
`session_key` char(64) NOT NULL,
`session_data` blob,
`session_expiry` int(11) unsigned NOT NULL,
PRIMARY KEY (`session_key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
- 在main.go里面配置数据库地址