app/deploy/install.html

44 lines
39 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="zh-Hans" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>安装 | 轻雪机器人</title>
<meta name="description" content="一个综合性的机器人应用及管理框架">
<meta name="generator" content="VitePress v1.5.0">
<link rel="preload stylesheet" href="/assets/style.ibT9l-Gp.css" as="style">
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
<script type="module" src="/assets/app.BT9SExIC.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/theme.DjavgrUf.js">
<link rel="modulepreload" href="/assets/chunks/framework._avq4Ty7.js">
<link rel="modulepreload" href="/assets/deploy_install.md.Sk9eehU9.lean.js">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="https://fonts.font.im/css?family=Cousine:400,400i,700,700i|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i">
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-2391887b data-v-cf959ac2><!--[--><!--]--><!--[--><span tabindex="-1" data-v-09f1bf64></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-09f1bf64> Skip to content </a><!--]--><!----><header class="VPNav" data-v-cf959ac2 data-v-4a2d6202><div class="VPNavBar" data-v-4a2d6202 data-v-8c2dd89c><div class="wrapper" data-v-8c2dd89c><div class="container" data-v-8c2dd89c><div class="title" data-v-8c2dd89c><div class="VPNavBarTitle has-sidebar" data-v-8c2dd89c data-v-60cf36d1><a class="title" href="/" data-v-60cf36d1><!--[--><!--]--><!--[--><!--[--><!--[--><img class="VPImage dark logo" src="/liteyuki-dark.svg" alt="LiteyukiBot Logo" data-v-e656d635><!--]--><!--[--><img class="VPImage light logo" src="/liteyuki.svg" alt="LiteyukiBot Logo" data-v-e656d635><!--]--><!--]--><!--]--><span data-v-60cf36d1>轻雪机器人</span><!--[--><!--]--></a></div></div><div class="content" data-v-8c2dd89c><div class="content-body" data-v-8c2dd89c><!--[--><!--]--><div class="VPNavBarSearch search" data-v-8c2dd89c><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="打开搜索框"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">搜索文档</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-8c2dd89c data-v-fb179ef2><span id="main-nav-aria-label" class="visually-hidden" data-v-fb179ef2> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/deploy/install.html" tabindex="0" data-v-fb179ef2 data-v-f6113321><!--[--><span data-v-f6113321>部署</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/usage/basic.html" tabindex="0" data-v-fb179ef2 data-v-f6113321><!--[--><span data-v-f6113321>使用</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/store/resource.html" tabindex="0" data-v-fb179ef2 data-v-f6113321><!--[--><span data-v-f6113321>扩展</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/dev/guide.html" tabindex="0" data-v-fb179ef2 data-v-f6113321><!--[--><span data-v-f6113321>开发</span><!--]--></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-8c2dd89c data-v-7a36dbca data-v-32e61f0e><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="语言" data-v-32e61f0e><span class="text" data-v-32e61f0e><span class="vpi-languages option-icon" data-v-32e61f0e></span><!----><span class="vpi-chevron-down text-icon" data-v-32e61f0e></span></span></button><div class="menu" data-v-32e61f0e><div class="VPMenu" data-v-32e61f0e data-v-12ef594d><!----><!--[--><!--[--><div class="items" data-v-7a36dbca><p class="title" data-v-7a36dbca>简体中文</p><!--[--><div class="VPMenuLink" data-v-7a36dbca data-v-a334e8c3><a class="VPLink link" href="/en/deploy/install.html" data-v-a334e8c3><!--[--><span data-v-a334e8c3>English</span><!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-8c2dd89c data-v-824ec8bd><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-824ec8bd data-v-d8e7d9d8 data-v-61ab5455><span class="check" data-v-61ab5455><span class="icon" data-v-61ab5455><!--[--><span class="vpi-sun sun" data-v-d8e7d9d8></span><span class="vpi-moon moon" data-v-d8e7d9d8></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-8c2dd89c data-v-b9e91830 data-v-0d378c5e><!--[--><a class="VPSocialLink no-icon" href="https://github.com/LiteyukiStudio/LiteyukiBot" aria-label="github" target="_blank" rel="noopener" data-v-0d378c5e data-v-229dabda><span class="vpi-social-github"></span></a><a class="VPSocialLink no-icon"
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/LiteyukiStudio/LiteyukiBot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --depth=1</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 若你不能访问Github可以使用Liteyuki镜像https://git.liteyuki.icu/bot/app</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 切换到Bot目录下</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> LiteyukiBot</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 创建虚拟环境</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">python</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -m</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> venv</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> venv</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 激活虚拟环境</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">venv</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Scripts</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">activate</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Windows</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">source</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> venv/bin/activate</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Linux</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 安装依赖</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pip</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -r</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> requirements.txt</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 启动Bot</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">python</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main.py</span></span></code></pre></div><h2 id="使用docker构建" tabindex="-1"><strong>使用Docker构建</strong> <a class="header-anchor" href="#使用docker构建" aria-label="Permalink to &quot;**使用Docker构建**&quot;"></a></h2><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> pull</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> git.liteyuki.icu/bot/app:latest</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # 每夜版镜像</span></span></code></pre></div><div class="tip custom-block github-alert"><p class="custom-block-title">TIP</p><p>Windows请使用项目绝对目录<code>/path/to/LiteyukiBot</code>代替<code>$(pwd)</code> <br> 若你修改了端口号请将<code>20216:20216</code>中的<code>20216</code>替换为你的端口号</p></div><h2 id="装置要求" tabindex="-1"><strong>装置要求</strong> <a class="header-anchor" href="#装置要求" aria-label="Permalink to &quot;**装置要求**&quot;"></a></h2><ul><li>Windows系统版本最低<code>Windows10+</code>/<code>Windows Server 2019+</code></li><li>Linux系统要支持Python3.10+,推荐<code>Ubuntu 20.04+</code>(<s>别用你那b CentOS</s>)</li><li>CPU: 至少<code>1vCPU</code></li><li>内存: Bot无其他插件会占用<code>300~500MB</code>,包括<code>chromium</code><code>node</code>等进程,其他插件占用视具体插件而定,建议<code>1GB</code>以上</li><li>硬盘: 至少<code>1GB</code>空间</li></ul><div class="warning custom-block github-alert"><p class="custom-block-title">WARNING</p><p>如果装置上有多个环境,请使用<code>path/to/python -m pip install -r requirements.txt</code>来安装依赖,<code>path/to/python</code> 为你的Python可执行文件路径</p></div><div class="warning custom-block github-alert"><p class="custom-block-title">WARNING</p><p>轻雪的更新功能依赖Git如果你没有安装Git直接下载源代码运行你将无法使用更新功能</p></div><h4 id="其他问题请移步至答疑" tabindex="-1">其他问题请移步至<a href="./fandq.html">答疑</a> <a class="header-anchor" href="#其他问题请移步至答疑" aria-label="Permalink to &quot;其他问题请移步至[答疑](./fandq)&quot;"></a></h4></div></div></main><footer class="VPDocFooter" data-v-92d339c1 data-v-d71d06df><!--[--><!--]--><div class="edit-info" data-v-d71d06df><div class="edit-link" data-v-d71d06df><a class="VPLink link vp-external-link-icon no-icon edit-link-button" href="https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/docs/zh/deploy/install.md" target="_blank" rel="noreferrer" data-v-d71d06df><!--[--><span class="vpi-square-pen edit-link-icon" data-v-d71d06df></span> 在 GitHub 上编辑此页<!--]--></a></div><div class="last-updated" data-v-d71d06df><p class="VPLastUpdated" data-v-d71d06df data-v-2530b5c9>Last updated: <time datetime="2024-11-15T18:17:06.000Z" data-v-2530b5c9></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-d71d06df><span class="visually-hidden" id="doc-footer-aria-label" data-v-d71d06df>Pager</span><div class="pager" data-v-d71d06df><!----></div><div class="pager" data-v-d71d06df><a class="VPLink link pager-link next" href="/deploy/config.html" data-v-d71d06df><!--[--><span class="desc" data-v-d71d06df>下一页</span><span class="title" data-v-d71d06df>配置</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-cf959ac2 data-v-2c1ead0b><div class="container" data-v-2c1ead0b><p class="message" data-v-2c1ead0b>文档由 <a href="https://
<script>window.__VP_HASH_MAP__=JSON.parse("{\"deploy_config.md\":\"1_CQ0FbK\",\"deploy_fandq.md\":\"BPleytoW\",\"deploy_install.md\":\"Sk9eehU9\",\"dev_api_bot_index.md\":\"Bi674fgO\",\"dev_api_bot_lifespan.md\":\"2zK906gE\",\"dev_api_comm_channel.md\":\"2kL837ew\",\"dev_api_comm_event.md\":\"BU5q7K5I\",\"dev_api_comm_index.md\":\"BQ4CZLqP\",\"dev_api_comm_storage.md\":\"DqJ8aVqB\",\"dev_api_config.md\":\"BF9ZWJMD\",\"dev_api_core_index.md\":\"C7-mYcFb\",\"dev_api_core_manager.md\":\"D-46Ej1L\",\"dev_api_dev_index.md\":\"C-Z4jV0w\",\"dev_api_dev_observer.md\":\"C8n3KGB-\",\"dev_api_dev_plugin.md\":\"kuS0l6X3\",\"dev_api_exception.md\":\"B1ZNvi-7\",\"dev_api_index.md\":\"DCSHyQNH\",\"dev_api_log.md\":\"Cht1l-z0\",\"dev_api_plugin_index.md\":\"Ob9cT1Tw\",\"dev_api_plugin_load.md\":\"B8TUs35a\",\"dev_api_plugin_manager.md\":\"CV_EY-n_\",\"dev_api_plugin_model.md\":\"B6zUTgyK\",\"dev_api_plugins_index.md\":\"BJaF6GJo\",\"dev_api_plugins_liteecho.md\":\"0olLW-gF\",\"dev_api_plugins_plugin_loader_index.md\":\"Bk_JMvR5\",\"dev_api_session_event.md\":\"eoIRQPSp\",\"dev_api_session_index.md\":\"BB5rwUqh\",\"dev_api_session_matcher.md\":\"DY05_Eet\",\"dev_api_session_message_segments.md\":\"0beZiwPd\",\"dev_api_session_models.md\":\"Jq2lUC1f\",\"dev_api_session_on.md\":\"ClG5jupL\",\"dev_api_session_rule.md\":\"Jlr6fWcz\",\"dev_api_utils.md\":\"BCPR7M6j\",\"dev_best_practices.md\":\"Cymrt9FM\",\"dev_comm.md\":\"BdU9h70O\",\"dev_guide.md\":\"CKJge6Av\",\"dev_lyfunc.md\":\"CTyKZzIv\",\"dev_plugin.md\":\"Cw4jmM1r\",\"dev_resource.md\":\"DHaliAic\",\"en_deploy_config.md\":\"BQn5E2Bj\",\"en_deploy_fandq.md\":\"BrjsxnAp\",\"en_deploy_install.md\":\"YWJCbrQ9\",\"en_dev_api_bot_index.md\":\"D7pBXyxE\",\"en_dev_api_bot_lifespan.md\":\"CB0llI1b\",\"en_dev_api_comm_channel.md\":\"BEDKOQou\",\"en_dev_api_comm_event.md\":\"DZFP2XdR\",\"en_dev_api_comm_index.md\":\"fm8_o36k\",\"en_dev_api_comm_storage.md\":\"CrdoT2Rt\",\"en_dev_api_config.md\":\"DXvPY7q0\",\"en_dev_api_core_index.md\":\"B8YwtibJ\",\"en_dev_api_core_manager.md\":\"DY8pAztC\",\"en_dev_api_dev_index.md\":\"BsvLsbb9\",\"en_dev_api_dev_observer.md\":\"Z8JLVw48\",\"en_dev_api_dev_plugin.md\":\"B4YGlvi7\",\"en_dev_api_exception.md\":\"Bi5kZE7B\",\"en_dev_api_index.md\":\"BRwWnJjT\",\"en_dev_api_log.md\":\"CYlQgvc9\",\"en_dev_api_plugin_index.md\":\"DMMLxcgg\",\"en_dev_api_plugin_load.md\":\"DBI0e8uW\",\"en_dev_api_plugin_manager.md\":\"YuROJtz4\",\"en_dev_api_plugin_model.md\":\"DzkLtdgt\",\"en_dev_api_plugins_index.md\":\"CcwDiD2t\",\"en_dev_api_plugins_liteecho.md\":\"XcPv4epx\",\"en_dev_api_plugins_plugin_loader_index.md\":\"DfULXUOM\",\"en_dev_api_session_event.md\":\"C68739Mu\",\"en_dev_api_session_index.md\":\"DlOjeQ_f\",\"en_dev_api_session_matcher.md\":\"Dsdkm06f\",\"en_dev_api_session_message_segments.md\":\"C40mpa6j\",\"en_dev_api_session_models.md\":\"5kxE35_Q\",\"en_dev_api_session_on.md\":\"CF0RXj7a\",\"en_dev_api_session_rule.md\":\"e29t-o48\",\"en_dev_api_utils.md\":\"IxF_QKMD\",\"en_dev_best_practices.md\":\"BL1nZ6wX\",\"en_dev_comm.md\":\"BD35_Pc4\",\"en_dev_guide.md\":\"CaoulG2S\",\"en_dev_lyfunc.md\":\"C0J7k9S-\",\"en_dev_plugin.md\":\"CZ1fZOSs\",\"en_dev_resource.md\":\"gbYl02_m\",\"en_index.md\":\"B7vJePRY\",\"en_store_plugin.md\":\"CKMtd26v\",\"en_store_resource.md\":\"B0jzMlOl\",\"en_usage_agreement.md\":\"DB-DF9k9\",\"en_usage_basic.md\":\"CqXCUHon\",\"en_usage_extra.md\":\"NcwXX0cF\",\"index.md\":\"DHOhfNpJ\",\"store_plugin.md\":\"BG-hPX54\",\"store_resource.md\":\"DxmwBnW7\",\"usage_agreement.md\":\"DgIDC_u9\",\"usage_basic.md\":\"D0kl3gm6\",\"usage_extra.md\":\"CsRUq0wh\"}");function deserializeFunctions(r){return Array.isArray(r)?r.map(deserializeFunctions):typeof r=="object"&&r!==null?Object.keys(r).reduce((t,n)=>(t[n]=deserializeFunctions(r[n]),t),{}):typeof r=="string"&&r.startsWith("_vp-fn_")?new Function(`return ${r.slice(7)}`)():r};window.__VP_SITE_DATA__=deserializeFunctions(JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"VitePress\",\"description\":\"A VitePress site\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\
</body>
</html>