ubuntu16.04上安装go和beego

1、下载go

下载地址:https://golang.google.cn/dl/
下载文件:go1.11.5.linux-amd64.tar.gz

tar -C /usr/local -xzf go1.11.5.linux-amd64.tar.gz

2、设置环境变量

vi /etc/profile

export GOPATH=/home/go
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

3、安装beego

go get github.com/astaxie/beego
go get github.com/beego/bee

4、使用beego

bee version
bee new myproject
cd /home/go/src/myproject
bee run

5、访问网站

localhost:8080

 

参考:https://www.cnblogs.com/studyzy/p/6964612.html

CREATE TABLE `student` ( 
  `Id` int(11) NOT NULL auto_increment, 
  `Name` varchar(10), 
  `Birthdate` date , 
  `Gender` tinyint(1) , 
  `Score` int(11), 
  PRIMARY KEY (`Id`) 
)

 

你可能感兴趣的:(linux,互联网)