import{_ as i,c as a,o as t,ah as e}from"./chunks/framework.BJEpWshW.js";const g=JSON.parse('{"title":"环境要求","description":"","frontmatter":{},"headers":[],"relativePath":"guide/requirements.md","filePath":"guide/requirements.md"}'),l={name:"guide/requirements.md"};function n(h,s,r,d,p,k){return t(),a("div",null,[...s[0]||(s[0]=[e(`<h1 id="环境要求" tabindex="-1">环境要求 <a class="header-anchor" href="#环境要求" aria-label="Permalink to “环境要求”">​</a></h1><p>在开始部署 WebAI2API 之前，请确保您的环境满足以下要求。</p><h2 id="系统要求" tabindex="-1">系统要求 <a class="header-anchor" href="#系统要求" aria-label="Permalink to “系统要求”">​</a></h2><h3 id="操作系统" tabindex="-1">操作系统 <a class="header-anchor" href="#操作系统" aria-label="Permalink to “操作系统”">​</a></h3><ul><li><strong>Windows</strong>: Windows 10/11 或 Windows Server 2016+</li><li><strong>Linux</strong>: Ubuntu 18.04+, Debian 10+, CentOS 7+ 或其他主流发行版</li><li><strong>macOS</strong>: macOS 10.15 (Catalina) 或更高版本</li></ul><h3 id="硬件配置" tabindex="-1">硬件配置 <a class="header-anchor" href="#硬件配置" aria-label="Permalink to “硬件配置”">​</a></h3><table tabindex="0"><thead><tr><th style="text-align:left;">资源</th><th style="text-align:left;">最低配置</th><th style="text-align:left;">推荐配置（单实例）</th><th style="text-align:left;">推荐配置（多实例）</th></tr></thead><tbody><tr><td style="text-align:left;"><strong>CPU</strong></td><td style="text-align:left;">1 核</td><td style="text-align:left;">2 核及以上</td><td style="text-align:left;">2 核及以上</td></tr><tr><td style="text-align:left;"><strong>内存</strong></td><td style="text-align:left;">1 GB</td><td style="text-align:left;">2 GB 及以上</td><td style="text-align:left;">4 GB 及以上</td></tr><tr><td style="text-align:left;"><strong>磁盘</strong></td><td style="text-align:left;">2 GB 可用空间</td><td style="text-align:left;">5 GB 及以上</td><td style="text-align:left;">7 GB 及以上</td></tr></tbody></table><div class="tip custom-block"><p class="custom-block-title">实测环境表现</p><ul><li><strong>Oracle 免费机</strong> (1C1G, Debian 12)：资源紧张，比较卡顿，仅供尝鲜或轻度使用</li><li><strong>阿里云轻量云</strong> (2C2G, Debian 11)：运行流畅，项目开发测试所用机型</li></ul></div><h2 id="软件依赖" tabindex="-1">软件依赖 <a class="header-anchor" href="#软件依赖" aria-label="Permalink to “软件依赖”">​</a></h2><h3 id="node-js" tabindex="-1">Node.js <a class="header-anchor" href="#node-js" aria-label="Permalink to “Node.js”">​</a></h3><ul><li><strong>版本要求</strong>: v20.0.0 或更高版本 (ABI 115+)</li><li><strong>包管理器</strong>: pnpm (推荐) 或 npm</li></ul><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 检查 Node.js 版本</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">node</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --version</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 安装 pnpm (如未安装)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -g</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> pnpm</span></span></code></pre></div><h3 id="camoufox" tabindex="-1">Camoufox <a class="header-anchor" href="#camoufox" aria-label="Permalink to “Camoufox”">​</a></h3><p>Camoufox 是本项目的核心依赖，会在安装过程中自动下载。</p><div class="warning custom-block"><p class="custom-block-title">网络要求</p><p>安装过程需要从 GitHub 下载 Camoufox 等预编译依赖，请确保网络能够正常访问 GitHub。</p></div><h2 id="docker-环境-可选" tabindex="-1">Docker 环境 (可选) <a class="header-anchor" href="#docker-环境-可选" aria-label="Permalink to “Docker 环境 (可选)”">​</a></h2><p>如果选择 Docker 部署方式，需要安装：</p><ul><li><strong>Docker</strong>: 20.10.0 或更高版本</li><li><strong>Docker Compose</strong>: 2.0.0 或更高版本 (可选)</li></ul><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 检查 Docker 版本</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --version</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> version</span></span></code></pre></div><h2 id="linux-特殊依赖" tabindex="-1">Linux 特殊依赖 <a class="header-anchor" href="#linux-特殊依赖" aria-label="Permalink to “Linux 特殊依赖”">​</a></h2><p>在 Linux 环境下运行非无头模式时，可能需要额外安装：</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Ubuntu/Debian</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> apt-get</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xvfb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> x11vnc</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># CentOS/RHEL</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> yum</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xorg-x11-server-Xvfb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> x11vnc</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Arch Linux</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> pacman</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -S</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xorg-server-xvfb</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> x11vnc</span></span></code></pre></div><h2 id="下一步" tabindex="-1">下一步 <a class="header-anchor" href="#下一步" aria-label="Permalink to “下一步”">​</a></h2><p>环境准备就绪后，请继续阅读 <a href="/guide/deployment.html">快速部署</a> 开始安装。</p>`,24)])])}const c=i(l,[["render",n]]);export{g as __pageData,c as default};
