Beego 在linux服务器部署
1.项目打包:
linux上部署: bee pack -be GOOS=linux
2.go环境安装
安装go:1sudo apt-get install golang-go
会安装到/usr/lib/go-1.6目录
3.工程管理:
|
|
添加环境变量:12345678910vi ~/.profile添加下面:export GOROOT=/usr/lib/go-1.6export PATH="$PATH:$GOROOT/bin"export GOPATH=/home/goexport PATH="$PATH:$GOPATH/bin"加载配置:source ~/.profile检查:go env
将打包文件放在linux下gopath路径下
修改权限 chmod 777 -R /home/go
进入到该目录
nohup 命令启动:1nohup ./项目名称 &