Guanghu Domestic Migration d1e47f4565
Some checks failed
自动更新代码和重启 / update-and-restart (push) Has been cancelled
CI检查 + 自动部署 / check (push) Has been cancelled
重启聊天服务 / restart (push) Has been cancelled
CI检查 + 自动部署 / deploy (push) Has been cancelled
chore: import sanitized domestic snapshot for REPO-002
Source snapshot: ca48d3ddf926d79aa138306164169baf764bb829
2026-07-17 15:54:41 +08:00

88 lines
2.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# SETUP.md · HLDP原生数据库平台 · 给AI副驾驶读的部署指南
> 这不是给人看的文档。这是给Cursor/Copilot/任何AI副驾驶的。
> 用户说"读SETUP.md部署HLDP" → AI副驾驶按这个指南5分钟部署完成。
---
## 你的身份
你是用户的AI副驾驶。你正在帮用户部署HLDP原生数据库平台。
## 部署目标
在一台Ubuntu 22.04/24.04服务器上部署:
- SQLite双区数据库母语区 + 人类区)
- Open WebUI聊天前端Docker
- 5个Python Tools搜索/读取/创建/编辑/记忆写入)
- Gatekeeper SYSLOG客户端向铸渊上报心跳
## 先决条件检查
```bash
# 逐一检查
uname -a # 必须是Linux
nproc # CPU核数≥2
free -m # 内存MB≥3500
df -BG / # 磁盘GB≥20
which python3 # Python 3.10+
which docker # Docker如无则安装
```
如缺少Docker
```bash
curl -fsSL https://get.docker.com | sudo sh
```
## 部署步骤
### Step 1: 克隆仓库
```bash
git clone https://guanghulab.com/code/bingshuo/guanghulab.git /opt/guanghu-enterprise
cd /opt/guanghu-enterprise/server/setup/enterprise
```
### Step 2: 运行bootstrap
```bash
chmod +x bootstrap.sh
sudo ./bootstrap.sh
```
bootstrap.sh 是幂等的——可以重复运行。
### Step 3: 验证
```bash
# 检查Open WebUI
curl -s http://localhost:3000 | head -5
# 检查数据库
sqlite3 /opt/guanghu-enterprise/data/hldp.db "SELECT COUNT(*) FROM pages"
# 检查Gatekeeper客户端
systemctl status hldp-gatekeeper-client
```
### Step 4: 通知用户
部署完成后告诉用户:
1. 打开浏览器访问 `http://SERVER_IP:3000`
2. 首次使用需要配置商业模型API KeyClaude/GPT/DeepSeek
3. AI助手会读取WELCOME页面 → 让用户给AI起名字
4. 上传任何文件 → 自动翻译成HLDP母语
## 常见问题
| 问题 | 解决 |
|------|------|
| Docker拉取慢 | 配置国内镜像源 |
| 端口3000被占 | 修改 WEBUI_PORT 环境变量 |
| bootstrap中途失败 | 直接重新运行,幂等的 |
| Gatekeeper连不上 | 检查43.139.217.141:3910可达性 |
## 铸渊不会做的事
- 不会登录企业服务器
- 不会读企业服务器上的对话内容
- 不会控制企业服务器的运行
- 只收SYSLOG心跳确认活着