# 第二章 环境准备与安装部署

第一章向你介绍了 OpenClaw 的核心概念与应用场景。现在，该是把它装进你的电脑了。

本章分为四个步骤：（1）确认系统满足最小要求，（2）选择合适的安装方式并完成安装，（3）通过向导进行首轮配置，（4）验证所有基础链路正常工作。这些步骤看似机械，但都有设计意图——比如为什么推荐先跳过“搜索引擎”和“渠道”配置，那是因为初装时任何一个失败的扩展都会拖累整个流程。通过系统化的准备步骤、完整的安装流程与验收测试，你能够在自己的环境中可靠地运行 OpenClaw，为后续章节的实践奠定坚实基础。

## 本章内容导读

本章包括以下几个小节：

* [**2.1 系统要求与运行前检查**](/openclaw_guide/di-yi-bu-fen-ji-chu-ru-men/02_setup/2.1_requirements.md)：明确 Node.js 版本、网络连通性及账号密钥前置条件。
* [**2.2 安装 OpenClaw**](/openclaw_guide/di-yi-bu-fen-ji-chu-ru-men/02_setup/2.2_installation.md)：通过推荐的一键脚本完成安装，了解替代安装方式与版本治理策略。
* [**2.3 初始化向导与首轮配置**](/openclaw_guide/di-yi-bu-fen-ji-chu-ru-men/02_setup/2.3_onboarding.md)：运行 `openclaw onboard` 初始化向导，完成最小配置并了解工作区产物。
* [**2.4 守护进程与可用性验收**](/openclaw_guide/di-yi-bu-fen-ji-chu-ru-men/02_setup/2.4_gateway_service.md)：管理后台服务进程，通过纯本地验收清单确认系统可用。
* [**2.5 本章小结**](/openclaw_guide/di-yi-bu-fen-ji-chu-ru-men/02_setup/summary.md)：关键要点回顾与下一步建议。

## 学习目标

完成本章的阅读后，你将能够：

1. **准备环境**：验证本地环境符合 OpenClaw 的运行要求。
2. **顺利安装**：使用官方工具完成完整的安装与初始化流程。
3. **验证可用性**：通过标准的诊断命令确认系统正常运行。
4. **建立基线**：为后续章节的实战应用打好基础。

**适用范围**

本指南适用于 macOS、Linux 及 Windows（建议使用 WSL2）环境。在生产级部署中，强烈建议采用 Linux 主机搭配 Docker，并辅以反向代理、进程守护程序以及严格的最小权限账号策略。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yeasy.gitbook.io/openclaw_guide/di-yi-bu-fen-ji-chu-ru-men/02_setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
