Files
openclaw-setup-cn/README.md

159 lines
3.6 KiB
Markdown
Raw 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.
# OpenClaw 一键安装脚本macOS / Windows
这个仓库提供一组简化脚本,用于快速安装并初始化 OpenClaw。
- `install-macos.sh`macOS 一键安装
- `install-windows.ps1`Windows 中文版一键安装
- `install-windows-en.ps1`Windows 英文版一键安装
- `configure-aws-bedrock.sh/.ps1`:可选的 AWS Bedrock 配置脚本
- `uninstall-macos.sh` / `uninstall-windows.ps1`:卸载脚本
---
## 与官方仓库对齐说明
本仓库已按 `openclaw/openclaw` 最新安装建议做了对齐:
1. 安装后统一进入 `openclaw onboard`
2. 向导阶段启用 `--install-daemon`,安装网关后台服务
3. 安装步骤改为“安装/更新”模式,避免机器上已有旧版本时不升级
4. 删除了与安装无关的营销内容,保留纯技术流程
官方参考:
- GitHub: https://github.com/openclaw/openclaw
- Docs: https://docs.openclaw.ai/start/getting-started
---
## 统一入口(安装 / 卸载)
> 运行脚本后会先弹出菜单,让用户选择:
> 1) 安装 / 更新
> 2) 卸载
### macOS
```bash
curl -fsSL https://github.carrydelahaye.work/openclaw/openclaw-setup-cn/raw/branch/main/install-macos.sh | bash
```
### WindowsPowerShell
```powershell
iwr -useb https://github.carrydelahaye.work/openclaw/openclaw-setup-cn/raw/branch/main/install-windows.ps1 | iex
```
> 官方文档对 Windows 的推荐路径是 **WSL2**。如果你准备长期稳定使用,建议参考:
> https://docs.openclaw.ai/platforms/windows
### 当前默认配置(适合完全新手)
- Gateway 监听在本机回环地址(`127.0.0.1` / `loopback`
- 默认跳过搜索提供商配置(`--skip-search`
- 默认跳过渠道配置(`--skip-channels`
- 默认跳过 Skills 配置(`--skip-skills`
---
## 安装脚本做了什么
| 步骤 | macOS | Windows |
|------|-------|---------|
| 1 | 检查/安装 Node.js 22+Homebrew | 检查/安装 Node.js 22+winget/choco |
| 2 | 安装或更新 OpenClaw | 安装或更新 OpenClaw |
| 3 | 运行 onboarding 向导 | 运行 onboarding 向导 |
| 4 | 安装 Gateway 后台服务 | 安装 Gateway 后台服务 |
向导命令(脚本内部):
```bash
openclaw onboard --accept-risk --flow quickstart --install-daemon --gateway-bind loopback --node-manager npm --skip-search --skip-channels --skip-skills
```
---
## 安装完成后
```bash
openclaw gateway status
openclaw dashboard
```
如果服务未启动,可执行:
```bash
openclaw gateway start
```
---
## 可选:配置 AWS Bedrock
### macOS / Linux
```bash
curl -fsSL https://github.carrydelahaye.work/openclaw/openclaw-setup-cn/raw/branch/main/configure-aws-bedrock.sh | bash
```
### Windows
```powershell
iwr -useb https://github.carrydelahaye.work/openclaw/openclaw-setup-cn/raw/branch/main/configure-aws-bedrock.ps1 | iex
```
脚本会提示输入:
- AWS Access Key ID
- AWS Secret Access Key
- Region默认 `us-east-1`
---
## 卸载
> 推荐直接运行上面的“统一入口”脚本,然后选择 **2) 卸载**。
> 下面保留独立卸载命令,方便自动化或批量操作。
### macOS
```bash
curl -fsSL https://github.carrydelahaye.work/openclaw/openclaw-setup-cn/raw/branch/main/uninstall-macos.sh | bash
```
### Windows
```powershell
iwr -useb https://github.carrydelahaye.work/openclaw/openclaw-setup-cn/raw/branch/main/uninstall-windows.ps1 | iex
```
---
## 常见问题
### 1) `openclaw: command not found`
重新打开终端后再试,或手动加载 PATH。
### 2) Node 版本过低
确保 Node.js 主版本为 22 或更高:
```bash
node -v
```
### 3) 网关异常
执行:
```bash
openclaw doctor
openclaw gateway status
```
---
## 许可证
MIT