golang,项目在服务器运行

set GOOS=linux

打包项目,丢到服务器

go build 项目名

执行命令

chmod -R 755 项目名

将项目编译成可运行文件

nohup ./项目名&

运行 ; 进入项目文件夹

./admin_jiazheng   

后台运行,进入项目文件夹

nohup ./ &    

ps aux|grep 项目名 查看运行的go程序

原文地址:https://www.cnblogs.com/yangxinpython/p/13792280.html