|
|
@@ -63,10 +63,7 @@ go install github.com/beego/bee/v2@latest
|
|
|
然后运行:bee pack -be GOOS=linux
|
|
|
```
|
|
|
|
|
|
-输出文件:`shudao-chat-go/bin/shudao-chat-go`,为可在 Linux x86_64 上运行的二进制。请同时准备以下运行所需文件/目录:
|
|
|
-- `conf/app.conf`(按环境修改数据库、API、OSS 等配置)
|
|
|
-- `assets/`、`static/`、`views/`(包含打包后的前端)
|
|
|
-- 其他运行依赖(如 `scripts/`、`models/` 中需要的资源)
|
|
|
+输出文件:压缩包:shudao-chat-go.tar.gz
|
|
|
|
|
|
### 4. 打包并上传到服务器
|
|
|
|
|
|
@@ -76,15 +73,14 @@ go install github.com/beego/bee/v2@latest
|
|
|
```
|
|
|
|
|
|
### 5. 服务器部署与运行
|
|
|
-
|
|
|
-cd /tmp
|
|
|
-cd tmp
|
|
|
-tar xvf shudao-chat-go.tar.gz
|
|
|
-chmod +x shudao-chat-go
|
|
|
-找到进程:ps -ef | grep shudao-chat-go
|
|
|
-杀死进程:kill -9 1029395 # 将 12345 替换为你找到的实际PID
|
|
|
-nohup ./shudao-chat-go &
|
|
|
-tail -f nohup.out #查看实时状态
|
|
|
+- cd /tmp
|
|
|
+- cd tmp
|
|
|
+- tar xvf shudao-chat-go.tar.gz
|
|
|
+- chmod +x shudao-chat-go
|
|
|
+- 找到进程:ps -ef | grep shudao-chat-go
|
|
|
+- 杀死进程:kill -9 1029395 # 将 12345 替换为你找到的实际PID
|
|
|
+- nohup ./shudao-chat-go &
|
|
|
+- tail -f nohup.out #查看实时状态
|
|
|
|
|
|
|
|
|
---
|