Files
2026-04-10 15:20:01 +08:00

122 lines
3.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.
# Windows-Test-Node节点使用指南
## 节点信息
- **IP地址**: 192.168.2.33
- **用户名**: administrator
- **SSH端口**: 22
- **Python版本**: Python 3.x
- **AKShare版本**: 1.1.101+
## 连接节点
### SSH连接
```bash
ssh administrator@192.168.2.33
```
### 文件传输
```bash
# 同步代码到Windows节点
rsync -avz --exclude='*.pyc' --exclude='__pycache__' /Users/chufeng/.openclaw/sanguo_projects/sanguo_quant_live/ administrator@192.168.2.33:/c/sanguo_quant_live/
# 同步数据文件
rsync -avz /Users/chufeng/.openclaw/sanguo_projects/sanguo_quant_live/zhaoyun-data/data/ administrator@192.168.2.33:/c/sanguo_quant_live/zhaoyun-data/data/
```
## 执行数据采集任务
### 方式一:直接SSH执行
```bash
# 连接到Windows节点
ssh administrator@192.168.2.33
# 在Windows节点上执行数据采集脚本
cd /c/sanguo_quant_live/zhaoyun-data
python scripts/akshare_downloader.py --symbols 510050 510300 --start-date 20210101 --end-date 20231231
```
### 方式二:直接远程执行
```bash
ssh administrator@192.168.2.33 'cd /c/sanguo_quant_live/zhaoyun-data && python scripts/akshare_downloader.py --symbols 510050 510300 --start-date 20210101 --end-date 20231231'
```
### 方式三:使用OpenClaw nodes命令(如支持)
```bash
openclaw nodes run --node "Windows-Test-Node" --raw 'cd /c/sanguo_quant_live/zhaoyun-data && python scripts/akshare_downloader.py --symbols 510050 510300 --start-date 20210101 --end-date 20231231'
```
## 环境验证
### 验证Python环境
```bash
ssh administrator@192.168.2.33 'python --version && pip --version'
```
### 验证AKShare安装
```bash
ssh administrator@192.168.2.33 'python -c "import akshare; print(akshare.__version__)"'
```
### 验证脚本可用性
```bash
ssh administrator@192.168.2.33 'cd /c/sanguo_quant_live/zhaoyun-data && python scripts/akshare_downloader.py --test'
```
## 常见问题
### 问题1SSH连接失败
**原因**: Windows节点可能未启用SSH服务或防火墙阻止连接。
**解决方法**:
```powershell
# 在Windows节点上运行
Start-Service sshd
Set-Service sshd -StartupType Automatic
```
### 问题2Python未找到
**原因**: Python未安装或未添加到系统PATH。
**解决方法**:
```bash
# 在Windows节点上运行
winget install Python.Python
```
### 问题3AKShare导入失败
**原因**: AKShare未安装或版本不兼容。
**解决方法**:
```bash
# 在Windows节点上运行
pip install --upgrade akshare
```
### 问题4:脚本执行失败
**原因**: 代码未同步或权限不足。
**解决方法**:
```bash
# 在本地Mac上运行,同步代码
rsync -avz --exclude='*.pyc' --exclude='__pycache__' /Users/chufeng/.openclaw/sanguo_projects/sanguo_quant_live/ administrator@192.168.2.33:/c/sanguo_quant_live/
```
## 自动化脚本
### 使用提供的配置脚本
```bash
cd /Users/chufeng/.openclaw/sanguo_projects/sanguo_quant_live/jiangwei-platform
./test-windows-node.sh
```
### 使用同步和执行脚本
```bash
cd /Users/chufeng/.openclaw/sanguo_projects/sanguo_quant_live/jiangwei-platform/scripts
./sync-and-run.sh
```
## 总结
Windows-Test-Node节点已配置为用于数据采集任务。您可以通过SSH连接到节点,同步代码,并执行数据采集脚本。如果遇到任何问题,请参考常见问题部分或联系运维人员。