Windows (PowerShell)安装部署OpenClaw
本文主要描述如何在Windows (PowerShell)操作系统中安装部署OpenClaw以及对接阿里云千问大模型服务。阿里云大模型平台安装部署千问大模型服务登录阿里云大模型部署平台安装运行大模型的支撑工具pip install githttps://github.com/sgl-project/sglang.git#subdirectorypythoneggsglang[all]使用支撑工具运行大模型服务SGLANG_USE_MODELSCOPEtrue python -m sglang.launch_server --model-path Qwen/Qwen3.5-2B --port 8000 --tp-size 1 --mem-fraction-static 0.8 --context-length 262144测试大模型接口服务curl http://127.0.0.1:8000/model_info测试大模型接口服务curl http://127.0.0.1:8000/v1/chat/completions \-H Content-Type: application/json \-d {model: Qwen/Qwen3.5-2B,messages: [{role: system, content: You are a helpful assistant.},{role: user, content: 请简要介绍一下量子计算。}],temperature: 0.7,max_tokens: 512}在阿里云大模型部署平台中创建API Key用于OpenClaw远程调用Windows操作系统安装部署OpenClaw在Windows操作系统中以管理员的身份打开PowerShell命令行控制台开始安装部署OpenClawiwr -useb https://openclaw.ai/install.ps1 | iexOpenClaw安装完成开始手工配置使用本地网关的模式配置设置OpenClaw的本地工作空间设置模型提供商为阿里云千问大模型设置阿里云千问大模型的API Key设置阿里云千问大模型的型号设置网关服务的属性参数忽略设置网络通道在web管理控制台中设置默认设置web搜索服务提供商为Ollama忽略设置技能在web管理控制台中设置OpenClaw设置完成使用以下的链接地址可访问web管理控制台修改PowerShell的执行文件的安全策略Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force重新启动OpenClaw的网关服务openclaw gateway --port 18789查看网关的运行状态openclaw gateway status查看OpenClaw的运行状态openclaw status在浏览器中访问web管理控制台与阿里云千问大模型对话