import{_ as n,c as t,b as i,a as l,d as a,e as h,w as d,r,o as k}from"./app-7lyk19d4.js";const p={};function c(o,s){const e=r("VPLink");return k(),t("div",null,[s[2]||(s[2]=i("h2",{id:"前置环境",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#前置环境"},[i("span",null,"前置环境")])],-1)),i("p",null,[s[1]||(s[1]=a("这里安装之前，需要先安装 mongodb 数据库，可以参考 ",-1)),h(e,{href:"mongodb.md"},{default:d(()=>[...s[0]||(s[0]=[a("使用 Docker 部署 MongoDB",-1)])]),_:1})]),s[3]||(s[3]=l(`<h2 id="安装-etlcloud" tabindex="-1"><a class="header-anchor" href="#安装-etlcloud"><span>安装 ETLCloud</span></a></h2><p>拉取社区版本镜像：</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">docker</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> pull</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> ccr.ccs.tencentyun.com/restcloud/restcloud-etl:V4.0</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><h3 id="部署容器" tabindex="-1"><a class="header-anchor" href="#部署容器"><span>部署容器</span></a></h3><p>如果您已经运行过同名容器，请先删除：</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">docker</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> rm</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -f</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> restcloud-etl-V4.0</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>使用以下命令进行部署（包含授权绑定、数据持久化和端口映射）：</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">docker</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> run</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -d</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> \\</span></span>
<span class="line"><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;">  --restart=always</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> \\</span></span>
<span class="line"><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;">  --privileged=true</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> \\</span></span>
<span class="line"><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;">  --name</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> restcloud-etl-V4.0</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> \\</span></span>
<span class="line"><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;">  --mac-address=01:D2:F4:18:B8:67</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> \\</span></span>
<span class="line"><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;">  -v</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> /data/tomcat:/usr/tomcat</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> \\</span></span>
<span class="line"><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;">  -p</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> 9527:8080</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> \\</span></span>
<span class="line"><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;">  ccr.ccs.tencentyun.com/restcloud/restcloud-etl:V4.0</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>参数说明：</strong></p><ul><li><code>--restart=always</code>: 容器退出时总是重启（如系统重启）。</li><li><code>--privileged=true</code>: 赋予容器特权模式，确保初始化正常。</li><li><code>--mac-address</code>: 固定 MAC 地址，用于绑定 License 授权（<strong>注意：第一个字节必须为偶数，建议使用 02 开头</strong>）。</li><li><code>-v /data/tomcat:/usr/tomcat</code>: 将 Tomcat 目录挂载到宿主机，实现数据持久化。</li><li><code>-p 9527:8080</code>: 访问端口映射，宿主机访问端口为 9527。</li></ul><p>拷贝容器中的 tomcat 目录到主机上</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">docker</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> cp</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> e0419ad8a2bf31743ec17368cf4098e293c36761842a7dcff8280fbc34195fba:/usr/tomcat</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> /data/</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>删除之前创建的简单容器</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">docker</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> rm</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -f</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> e0419ad8a2bf31743ec17368cf4098e293c36761842a7dcff8280fbc34195fba</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>在 /data/tomcat 路径下，编辑ETLCloud mongo相关的配置文件，这里的信息参考之前创建的 MongoDB 实例。 这里我额外修改了 server.port ,这里太容易和其他的服务端口冲突，所以这里修改为 9527。</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">sudo</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> vim</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> ./webapps/ROOT/WEB-INF/classes/application.properties</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">server.port</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;">=9527</span></span>
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;">...</span></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;">#集群服务器之间同步用的公共配置数据库,空表示和配置库一起</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">spring.data.mongodb.host</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;">=127.0.0.1:27018</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">spring.data.mongodb.repositories.enabled</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;">=</span><span style="--shiki-light:#998418;--shiki-dark:#B8A965;">true</span></span>
<span class="line"><span style="--shiki-light:#A0ADA0;--shiki-dark:#758575DD;">#MongoDb的数据库认证用户名及密码,没有可以为空</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">spring.data.mongodb.username</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;">=admin</span></span>
<span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">spring.data.mongodb.password</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;">=admin</span></span>
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;">...</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>然后可以启动容器，样例如下：</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">docker</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> run</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -d</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> --restart=always</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> --restart=on-failure:5</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> --privileged=true</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> --name</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> restcloud-etl-V4.0</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> --mac-address=自定义mac地址</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -v</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> /home/tomcat:/usr/tomcat</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -p</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> 8080:8080</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> 镜像id</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>具体命令，这里的MAC地址参数一定是要有的，不然每次重新创建之后MAC地址会变就需要重新生成SN码</p><p>这里的MAC地址不要和博主写一样的...自己随机一个或者随便写一个就行</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#59873A;--shiki-dark:#80A665;">docker</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> run</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -d</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> --restart=always</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> --restart=on-failure:5</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> --privileged=true</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> --name</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> restcloud-etl-V4.0</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> --mac-address=02:D2:00:00:00:67</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -v</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> /data/tomcat:/usr/tomcat</span><span style="--shiki-light:#A65E2B;--shiki-dark:#C99076;"> -p</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> 9527:8080</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> 4a5c0ed2a5b2</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>然后访问 服务器IP:9527/restcloud/admin/login 就可以啦</p><p>后面的话就是去官网申请一个SN码，然后就可以开始使用啦。</p>`,23))])}const m=n(p,[["render",c]]),u=JSON.parse('{"path":"/ops/docker/ETLCloud/","title":"ETLCloud","lang":"zh-CN","frontmatter":{"title":"ETLCloud","createTime":"2025/12/24 17:13:36","permalink":"/ops/docker/ETLCloud/","description":"前置环境 这里安装之前，需要先安装 mongodb 数据库，可以参考 安装 ETLCloud 拉取社区版本镜像： 部署容器 如果您已经运行过同名容器，请先删除： 使用以下命令进行部署（包含授权绑定、数据持久化和端口映射）： 参数说明： --restart=always: 容器退出时总是重启（如系统重启）。 --privileged=true: 赋予容器...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"ETLCloud\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-12-25T01:48:06.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://notes.simengweb.com/ops/docker/ETLCloud/"}],["meta",{"property":"og:site_name","content":"仲夏夜之梦"}],["meta",{"property":"og:title","content":"ETLCloud"}],["meta",{"property":"og:description","content":"前置环境 这里安装之前，需要先安装 mongodb 数据库，可以参考 安装 ETLCloud 拉取社区版本镜像： 部署容器 如果您已经运行过同名容器，请先删除： 使用以下命令进行部署（包含授权绑定、数据持久化和端口映射）： 参数说明： --restart=always: 容器退出时总是重启（如系统重启）。 --privileged=true: 赋予容器..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-12-25T01:48:06.000Z"}],["meta",{"property":"article:modified_time","content":"2025-12-25T01:48:06.000Z"}]]},"readingTime":{"minutes":1.98,"words":595},"git":{"createdTime":1766627286000,"updatedTime":1766627286000,"contributors":[{"name":"祀梦","username":"","email":"3501646051@qq.com","commits":1,"avatar":"https://gravatar.com/avatar/6406a81eeddc359cf3d3ce018797689fc6d014ff06215c27d0210b42e8f5a8ab?d=retro"}]},"autoDesc":true,"filePathRelative":"notes/ops/docker/ETLCloud.md","headers":[]}');export{m as comp,u as data};
