知识库

标准化实施手册及常见错误


预览服务更换国产东方通镜像

<h2>1.准备工作:</h2> <p>预览镜像包、开放两个端口,一个东方通控制台端口、一个预览应用访问端口 查看服务器操作系统版本:arch (本文以centos的x86为例) <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/15b1c9394981e773b2d7923a55826adc" alt="" /> 国产飞腾麒麟 <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/fce58061f28df7cbf82d1abfa524d504" alt="" /></p> <h2>2.下载对应操作系统镜像包</h2> <p>上传到服务器的<code>/risen/soft/package</code>(上传目录可自定义) x86的 <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/9e5599d025cbb9fc5c833910017942b7" alt="" /> arrch64 <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/d3b0ce49d93a3be9d7b16790b8102112" alt="" /></p> <h2>3.查找预览包位置及附件存放位置</h2> <p>执行<code>docker inspect yulan</code>找到类似图中地址 <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/3790ce836c20cf36c4422657cd6729a9" alt="" /> 预览在服务器上附件地址:<code>/risen/soft/docker/volumes/RESOURCE_ROOT/_data</code> 预览项目包存放地址:<code>/risen/soft/docker/volumes/webapps/_data</code></p> <h2>4.备份预览包</h2> <p>备份命名方式:年份+月份+日,例如20210831 创建备份目录:<code>mkdir -p /risen/data/bak/20210831/</code> 备份预览包:<code>cp -r /risen/soft/docker/volumes/webapps/_data/yl /risen/data/bak/20210831/</code></p> <h2>5.记录预览的存放地址</h2> <h2>6.加载上传镜像包</h2> <p>切换目录只上传目录:<code>cd /risen/soft/package/</code> <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/2e75fb2fb2f35d635aee91df38919549" alt="" /> 执行:<code>docker load -i yulan_tongweb_x86.tar</code> 等待镜像加载 加载完成之后使用<code>docker images</code>查看镜像,记录镜像id: ef6b6bfcbad8 <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/7045496b42d262e89aa8935624849243" alt="" /></p> <h2>7.重新初始化容器</h2> <p>映射东方通存放项目包的路径:<code>/risen/soft/Tongweb7/deployment</code> 同时需要映射访问端口(8080)和管理端口(9060)</p> <pre><code class="language-java">docker run -dit --name yulan -p 8081:8080 -p 9060:9060 -v /etc/localtime:/etc/localtime:ro -v /risen/soft/docker/volumes/RESOURCE_ROOT/_data:/risen/data/RESOURCE_ROOT --restart=always -v /risen/soft/docker/volumes/webapps/_data:/risen/soft/Tongweb7/deployment ef6b6bfcbad8 /root/run.sh</code></pre> <pre><code class="language-java">缺少部分文件时运行: --ulimit nofile=65535:65535 --ulimit nproc=65535 参数解析: -dit 后台运行容器 --name yulan 指定容器的名称 -p 8081:8080 指定端口映射关系,上方命令中8081为宿主机端口(根据需求设置端口,访问预览时用此端口访问),8080为容器端口(默认不变) -v /etc/localtime:/etc/localtime:ro 同步时间参数 -v /risen/data/yulan:/risen/data/yulan 冒号前为宿主机路径,冒号后为容器路径,意思即为将容器内的路径映射到宿主机的路径,冒号前(宿主机)的路径根据第3步配置的预览附件地址修改 --restart=always 容器随docker的启动而启动,即自启</code></pre> <p>初始化完成后使用<code>docker ps</code>查看容器是否启动 <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/692d58cc30c7c82957aa1b5badbe11a9" alt="" /> 查看预览包存放路径预览包是否存在,不存在则将之前的备份目录下的预览包拷贝过来 拷贝命令:<code>cp -r /risen/data/bak/20210831/yl /risen/soft/docker/volumes/webapps/_data</code> 拷贝完重启预览容器:<code>docker restart yulan</code> <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/6dcaa20ed487ac8041ad59bf0cc61c3d" alt="" /> 重启成功后查看日志是否有报错 <code>docker logs yulan -f --tail 1000</code>查看名为yulan的容器的日志(从倒数第1000行开始) <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/297f0e8b798bc4f35bc023ca27bc714a" alt="" /> 最后,访问东方通控制台地址部署预览 <a href="http://ip:9060/console">http://ip:9060/console</a> 用户密码:<code>thanos/thanos123.com</code> <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/a55b784b44c218aff289bd204b758993" alt="" /> <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/36a363ac6ae4952cb9e2e61b91fc62f6" alt="" /> <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/a78919309cad43ca84b6fdf49c35aa3f" alt="" /> <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/6cbb796638987196768931f0a0871e04" alt="" /> <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/21b08680457cd03787ec82e7aa226cab" alt="" /> <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/19e450cdf455736be166a8cbe2f3e86f" alt="" /> 等待部署完成! 访问预览地址 修改预览后台附件配置 使用admin管理员账户登录预览 登录之后地址栏后加<code>?CODE=core&amp;amp;UI=default</code>进入管理后台,附件存放路径(根据服务安装环境配置)配置 <img src="http://60.191.64.5:16100/server/index.php?s=/api/attachment/visitFile/sign/4698dcb52a8f9a7b58527cd940b523e5" alt="" /></p>

页面列表

ITEM_HTML