<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Channel [K]</title>
	<atom:link href="https://www.dbform.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbform.com</link>
	<description>面朝大海，春暖花开</description>
	<lastBuildDate>Fri, 13 Mar 2026 07:46:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">157178879</site>	<item>
		<title>OpenClaw 发展历程表：从 clawdbot 到 openclaw</title>
		<link>https://www.dbform.com/2026/03/13/openclaw-%e5%8f%91%e5%b1%95%e5%8e%86%e7%a8%8b%e8%a1%a8%ef%bc%9a%e4%bb%8e-clawdbot-%e5%88%b0-openclaw/</link>
					<comments>https://www.dbform.com/2026/03/13/openclaw-%e5%8f%91%e5%b1%95%e5%8e%86%e7%a8%8b%e8%a1%a8%ef%bc%9a%e4%bb%8e-clawdbot-%e5%88%b0-openclaw/#respond</comments>
		
		<dc:creator><![CDATA[kamus]]></dc:creator>
		<pubDate>Fri, 13 Mar 2026 07:46:07 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[openclaw]]></category>
		<guid isPermaLink="false">https://www.dbform.com/?p=4553</guid>

					<description><![CDATA[OpenClaw 发展历程表：从 clawdbot 到 openclaw 这份时间线，是从 v2026.1.5 开始往后捋。按 release 命名和说明来看，这一版基本可以当成项目正式进入 clawdbot 阶段的起点。后面它先经历了 clawdbot、Clawdbot 这几个写法上的变化，中间还短暂改名成过 Moltbot，直到 v2026.1.29 前后才真正把名字切到 openclaw。 按时间排序的发展历程表 发布时间（UTC） 版本 发布名称 关键变化 为什么值得高亮 2026-01-05 v2026.1.5 clawdbot 2026.1.5 引入 image 专用模型配置、image 工具、默认模型 shorthand，同时继续补齐 Control UI、Android、macOS、WhatsApp、Discord 等体验问题 这是目前这条时间线上，clawdbot 作为正式 release 名称出现的起点，适合拿来当发展史的开头 2026-01-15 v2026.1.14-1 clawdbot 2026.1.14-1 加入 web_search / web_fetch、Chrome 扩展接管与远程浏览器控制、channel plugins、Zalo 插件、安全审计增强 从这一版开始，项目的边界开始打开，不再只是“接模型回消息”，而是更像一个能搜网、能控浏览器、能接渠道的系统 2026-01-17 v2026.1.16-2 clawdbot [&#8230;]]]></description>
										<content:encoded><![CDATA[<h1>OpenClaw 发展历程表：从 <code>clawdbot</code> 到 <code>openclaw</code></h1>
<p>这份时间线，是从 <code>v2026.1.5</code> 开始往后捋。按 release 命名和说明来看，这一版基本可以当成项目正式进入 <code>clawdbot</code> 阶段的起点。后面它先经历了 <code>clawdbot</code>、<code>Clawdbot</code> 这几个写法上的变化，中间还短暂改名成过 <code>Moltbot</code>，直到 <code>v2026.1.29</code> 前后才真正把名字切到 <code>openclaw</code>。</p>
<h2>按时间排序的发展历程表</h2>
<table>
<thead>
<tr>
<th>发布时间（UTC）</th>
<th>版本</th>
<th>发布名称</th>
<th>关键变化</th>
<th>为什么值得高亮</th>
</tr>
</thead>
<tbody>
<tr>
<td>2026-01-05</td>
<td><code>v2026.1.5</code></td>
<td><code>clawdbot 2026.1.5</code></td>
<td>引入 image 专用模型配置、<code>image</code> 工具、默认模型 shorthand，同时继续补齐 Control UI、Android、macOS、WhatsApp、Discord 等体验问题</td>
<td>这是目前这条时间线上，<code>clawdbot</code> 作为正式 release 名称出现的起点，适合拿来当发展史的开头</td>
</tr>
<tr>
<td>2026-01-15</td>
<td><code>v2026.1.14-1</code></td>
<td><code>clawdbot 2026.1.14-1</code></td>
<td>加入 <code>web_search</code> / <code>web_fetch</code>、Chrome 扩展接管与远程浏览器控制、channel plugins、Zalo 插件、安全审计增强</td>
<td>从这一版开始，项目的边界开始打开，不再只是“接模型回消息”，而是更像一个能搜网、能控浏览器、能接渠道的系统</td>
</tr>
<tr>
<td>2026-01-17</td>
<td><code>v2026.1.16-2</code></td>
<td><code>clawdbot 2026.1.16-2</code></td>
<td>引入 hooks 系统、媒体理解（图像/音频/视频）、PTY <code>exec</code>、hook pack 安装、用户可调用 skill 命令、跨平台会话链接</td>
<td>这一版把可编排性拉高了很多，离 agent 平台更近了一步</td>
</tr>
<tr>
<td>2026-01-24</td>
<td><code>v2026.1.23</code></td>
<td><code>Clawdbot 2026.1.23</code></td>
<td>Telegram TTS 进入 core、增加 <code>/tools/invoke</code> HTTP endpoint、heartbeat 可见性控制、Fly.io 部署支持、Tlon/Urbit 插件</td>
<td>这一版开始，<code>Clawdbot</code> 的写法趋于稳定，产品也越来越像一个能部署、能开放接口、能扩渠道的系统</td>
</tr>
<tr>
<td>2026-01-25</td>
<td><code>v2026.1.24</code></td>
<td><code>Clawdbot 2026.1.24</code></td>
<td>Ollama discovery、LINE 插件、Edge TTS fallback、全渠道 <code>/approve</code> 审批、Telegram DM topics 独立会话、Control UI 设计系统刷新</td>
<td>本地模型、语音、审批流、插件、UI 一起往前推，是一次很典型的“完成度上台阶”更新</td>
</tr>
<tr>
<td>2026-01-27</td>
<td>品牌过渡节点</td>
<td><code>Moltbot</code> 阶段开始</td>
<td>因商标压力，<code>Clawdbot</code> 短暂改名为 <code>Moltbot</code>，随后社区与文档也开始跟进这次过渡命名</td>
<td>这是 <code>Clawdbot -&gt; OpenClaw</code> 中间很短暂的一次改名</td>
</tr>
<tr>
<td>2026-01-30</td>
<td><code>v2026.1.29</code></td>
<td><code>openclaw 2026.1.29</code></td>
<td><strong>正式 rebrand</strong>：npm 包/CLI 改名为 <code>openclaw</code>，扩展改到 <code>@openclaw/*</code>，兼容 shim 与旧路径迁移同步上线，macOS app rename 完成</td>
<td>这是整条发展线里最重要的品牌拐点，<code>OpenClaw</code> 时代从这里真正开始</td>
</tr>
<tr>
<td>2026-02-02</td>
<td><code>v2026.2.1</code></td>
<td><code>openclaw 2026.2.1</code></td>
<td><code>.clawdbot</code> 到 <code>.openclaw</code> 路径迁移继续完善，TLS 1.3 最低要求、安全修复集中补强、系统提示与工具策略一致性改进</td>
<td>改名之后最怕的是各种边角不一致，这一版做的就是这种不显眼但特别关键的收尾工作</td>
</tr>
<tr>
<td>2026-03-01</td>
<td>星标里程碑</td>
<td><code>v2026.3.1</code> 发布前夜</td>
<td>OpenClaw 超过 <code>facebook/react</code>，成为 GitHub 上 star 最多的<strong>非聚合型软件项目</strong></td>
<td>这不是 GitHub 全站仓库总榜第一，但它是 OpenClaw 影响力出圈的标志性时刻</td>
</tr>
<tr>
<td>2026-03-13</td>
<td><code>v2026.3.12</code></td>
<td><code>openclaw 2026.3.12</code></td>
<td>dashboard-v2、OpenAI/Anthropic fast mode、provider-plugin 架构推进、subagent <code>sessions_yield</code>、更多安全修复</td>
<td>这是 <code>openclaw</code> 进入成熟阶段的代表版本，工作台形态和平台化方向都更清楚了</td>
</tr>
</tbody>
</table>
<p><img decoding="async" src="https://files.seeusercontent.com/2026/03/13/A9le/openclaw-timeline-nord-light-v2.svg" alt="openclaw-timeline-nord-light-v2.svg" /></p>
<h2>关键阶段解读</h2>
<h3>1. <code>clawdbot</code> 阶段的起点：<code>v2026.1.5</code></h3>
<p><code>v2026.1.5</code> 之所以值得拿出来单说，不只是因为它加了 image model 和 <code>image</code> 工具，更重要的是，它在 release 名称里明确用了 <code>clawdbot</code>。</p>
<p>如果你是站在“发展史”这个角度往回看，很多时候真正重要的并不是某个单点功能，而是项目开始以什么名字、什么姿态稳定对外发布。<code>v2026.1.5</code> 给人的感觉就是：这个项目已经不是一个随手试验的小仓库了，它开始以 <code>clawdbot</code> 的名义连续往前推版本。</p>
<h3>2. 能力开始外扩：<code>v2026.1.14-1</code> 到 <code>v2026.1.16-2</code></h3>
<p>我觉得这两个版本要放在一起看。</p>
<p><code>v2026.1.14-1</code> 把网页搜索、网页抓取、浏览器接管、远程浏览器控制、通道插件这些能力拉进来了。紧接着 <code>v2026.1.16-2</code> 又把 hooks、媒体理解、PTY 执行、hook pack 安装、skill 命令这些东西补上。</p>
<p>放在一起就很明显了：项目已经不再只是“接一个大模型，然后把回复发出去”。它开始具备下面这些更像 agent 系统的特征：</p>
<ul>
<li>能拿外部信息</li>
<li>能操作浏览器</li>
<li>能接更多消息渠道</li>
<li>能处理图片、音频、视频这类输入</li>
<li>能用 hooks 和 exec 把自动化流程串起来</li>
</ul>
<p>这时候的 <code>clawdbot</code> 已经具备平台雏形。</p>
<h3>3. <code>Clawdbot</code> 阶段的放大版：<code>v2026.1.23</code> 和 <code>v2026.1.24</code></h3>
<p>如果前面那几版是在扩边界，那 <code>v2026.1.23</code> 和 <code>v2026.1.24</code> 更像是在补产品感。</p>
<p><code>v2026.1.23</code> 把 Telegram TTS 往 core 里推了一步，又加了 <code>/tools/invoke</code> HTTP endpoint。这个点挺重要的，因为它意味着外部系统不只是“接它的回复”，而是可以更直接地调它的工具能力。到了 <code>v2026.1.24</code>，Ollama discovery、LINE 插件、Edge TTS fallback、全渠道 <code>/approve</code>、Telegram DM topics、Control UI 设计系统刷新这些又一起上来了。</p>
<p>这些东西单独看都不算改天换地，但合起来会让人感觉：这个项目开始更像一个完整产品，而不是一堆厉害功能的集合。</p>
<p>最直观的变化大概有这几类：</p>
<ul>
<li>部署方式更多</li>
<li>插件和渠道更丰富</li>
<li>审批和 TTS 这种实际使用中的流程更顺畅</li>
<li>控制界面更像真的要长期给人用的界面</li>
<li>本地模型这条路也更加清楚</li>
</ul>
<h3>4. <code>Moltbot</code> 短暂过渡期：<code>2026-01-27</code></h3>
<p><code>clawdbot</code> 并不是直接一步改成 <code>openclaw</code>，而是先短暂改名成了 <code>Moltbot</code>。创始人谈及收到了Anthropic公司礼貌的请求改名的函件。</p>
<p>根据官方 lore 页面和当时的外部报道，<strong><code>2026-01-27</code> 这一天，项目先短暂改名成了 <code>Moltbot</code>。</strong> 这次改名很短，后来又很快被 <code>OpenClaw</code> 取代，如果只看 GitHub release中的发布名称，很容易把这段历史忽略掉。</p>
<h3>5. 正式改名：<code>v2026.1.29</code></h3>
<p>整条时间线里，如果只挑一个必须单独圈出来的版本，那大概率就是 <code>v2026.1.29</code>。</p>
<p>这一版不是那种“文案层面改个 logo”的改名。release 里写得很清楚：</p>
<ul>
<li>npm package / CLI 改名为 <code>openclaw</code></li>
<li>提供 <code>openclaw</code> compatibility shim</li>
<li>extensions 迁移到 <code>@openclaw/*</code></li>
<li>自动迁移旧的 state/config 路径</li>
<li>macOS 侧的 OpenClaw app rename 也收尾了</li>
</ul>
<p>也就是说，这次改名是全链路的：</p>
<ul>
<li>命令行入口</li>
<li>包名</li>
<li>扩展生态命名</li>
<li>本地状态目录和配置路径</li>
<li>桌面应用</li>
</ul>
<p>所以从项目史的角度看，<code>v2026.1.29</code> 其实很适合直接写成一句话：<strong>OpenClaw 时代从这里开始。</strong></p>
<h3>6. 改名之后的收口：<code>v2026.2.1</code></h3>
<p>改名这件事，真正麻烦的往往不在改名当天，而在改完之后。</p>
<p>新名字换上去不难，难的是那些老路径、旧配置、残留命名、权限边界、默认行为到底有没有一起跟上。<code>v2026.2.1</code> 的价值就在这里。它把不少真正影响稳定性的边角补了起来：<code>.clawdbot</code> 到 <code>.openclaw</code> 的迁移继续完善，TLS 1.3 最低要求、安全修复、工具策略一致性、系统提示规则这些也都在继续修改为适配新品牌。</p>
<h3>7. 更成熟的工作台阶段：<code>v2026.3.12</code></h3>
<p>如果说 <code>v2026.1.29</code> 是品牌上的拐点，那 <code>v2026.3.12</code> 更像是产品形态上的拐点。</p>
<p>这一版最醒目的东西是 dashboard-v2、fast mode、provider-plugin 架构、subagent 机制继续增强。它传递出来的信息很明确：OpenClaw 已经不只是继续“多接几个 provider、多补几个渠道”了，而是在往一个更统一的 AI 工作台走。</p>
<p>这里面我最看重的其实不是单个 feature，而是方向开始统一：</p>
<ul>
<li>Control UI 不再只是配置入口，而像一个真正的工作台</li>
<li>provider 接入开始更模块化</li>
<li>多 agent / subagent 的编排能力还在继续长</li>
<li>安全治理也不再是零散修补，而更像系统性推进</li>
</ul>
<p>换句话说，到这个阶段，OpenClaw 已经不是单纯“功能继续涨”的项目，它开始同时处理平台化和产品化这两件事。</p>
<h3>8. 值得记下来的外部里程碑：<code>2026-03-01</code></h3>
<p>还有一个时间点绝对不该漏掉，虽然它不是一个 release 版本本身。</p>
<p>根据公开的 Star History 文章和当时的公开讨论，<strong><code>2026-03-01</code> 这一天，OpenClaw 超过了 <code>facebook/react</code>，成为 GitHub 上 star 最多的非聚合型软件项目。</strong> 这句话要说严谨一点，因为它不是 GitHub 全站所有仓库里的绝对第一；排在前面的还有不少 <code>awesome-*</code>、教程合集、书单和资源索引类仓库。</p>
<p>但即便加上这个限定，这个节点依然很重要。因为它说明 OpenClaw 的影响力已经不只是停留在 agent 圈子、开源圈子或者 AI 工具用户内部了，它开始进入一种更广泛的技术社区共识：不管你喜不喜欢它，它都已经变成 GitHub 上最受关注的软件项目之一。</p>
<p>如果把这个时间点和 release 对起来看，它正好落在 <strong><code>v2026.3.1</code> 发布前夜</strong>。也就是说，OpenClaw 在进入 <code>v2026.3.1</code> 这个阶段时，外部关注度已经冲到了一个很夸张的位置。后面 <code>v2026.3.12</code> 再往工作台化、平台化方向走，这个背景就更容易理解了：项目不只是用户多了，而是真的进入了“大众技术视野里的头部项目”区间。</p>
<h2>如果只选 5 个必须高亮的版本</h2>
<table>
<thead>
<tr>
<th>版本</th>
<th>为什么一定要提</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>v2026.1.5</code></td>
<td><code>clawdbot</code> 命名阶段的起点</td>
</tr>
<tr>
<td><code>v2026.1.14-1</code></td>
<td>第一次明显把网页搜索、浏览器控制、插件化渠道拉进核心能力范围</td>
</tr>
<tr>
<td><code>v2026.1.16-2</code></td>
<td>hooks、媒体理解、PTY exec 让项目真正有了 agent 平台雏形</td>
</tr>
<tr>
<td><code>v2026.1.29</code></td>
<td>正式从 <code>clawdbot</code> 改名为 <code>openclaw</code></td>
</tr>
<tr>
<td><code>v2026.3.12</code></td>
<td><code>openclaw</code> 进入成熟工作台阶段的代表版本</td>
</tr>
</tbody>
</table>
<h2>参考 release</h2>
<ul>
<li><code>v2026.1.5</code>: https://github.com/openclaw/openclaw/releases/tag/v2026.1.5</li>
<li><code>v2026.1.14-1</code>: https://github.com/openclaw/openclaw/releases/tag/v2026.1.14-1</li>
<li><code>v2026.1.16-2</code>: https://github.com/openclaw/openclaw/releases/tag/v2026.1.16-2</li>
<li><code>v2026.1.23</code>: https://github.com/openclaw/openclaw/releases/tag/v2026.1.23</li>
<li><code>v2026.1.24</code>: https://github.com/openclaw/openclaw/releases/tag/v2026.1.24</li>
<li><code>v2026.1.29</code>: https://github.com/openclaw/openclaw/releases/tag/v2026.1.29</li>
<li><code>v2026.2.1</code>: https://github.com/openclaw/openclaw/releases/tag/v2026.2.1</li>
<li><code>v2026.3.12</code>: https://github.com/openclaw/openclaw/releases/tag/v2026.3.12</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbform.com/2026/03/13/openclaw-%e5%8f%91%e5%b1%95%e5%8e%86%e7%a8%8b%e8%a1%a8%ef%bc%9a%e4%bb%8e-clawdbot-%e5%88%b0-openclaw/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4553</post-id>	</item>
		<item>
		<title>How to add Dictionaries to RIME Input Method on Ubuntu/Pop-OS</title>
		<link>https://www.dbform.com/2024/08/20/how-to-add-dictionaries-to-rime-input-method-on-ubuntu-pop-os/</link>
					<comments>https://www.dbform.com/2024/08/20/how-to-add-dictionaries-to-rime-input-method-on-ubuntu-pop-os/#respond</comments>
		
		<dc:creator><![CDATA[kamus]]></dc:creator>
		<pubDate>Tue, 20 Aug 2024 09:20:02 +0000</pubDate>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[RIME]]></category>
		<guid isPermaLink="false">https://www.dbform.com/?p=4463</guid>

					<description><![CDATA[在RIME输入法中增加词典 1. RIME的配置目录 Ubuntu/PopOS中位于：~/.config/ibus/rime 2. 下载词典文件 使用git clone下载RIME扩充词库： https://github.com/rime-aca/dictionaries 使用rime-install下载zhwiki词典：https://github.com/felixonmars/fcitx5-pinyin-zhwiki 3. 将所有词库文件cp到RIME配置目录中 cp *dict* ~/.config/ibus/rime/ 4. 增加一个custom配置文件用以调用词库 在下载的RIME扩充词库目录中，有一个luna_pinyin.custom.yaml，当使用朙月拼音的时候可以直接使用该配置，但是我使用的是朙月拼音简化字方案，因此需要将该配置文件改名为： luna_pinyin_simp.custom.yaml 在这个配置文件中，可以看到输入法的对应 # 附朙月拼音系列方案與其對應的 id 一覽表： # 輸入方案 id # 朙月拼音 luna_pinyin # 朙月拼音·简化字 luna_pinyin_simp # 朙月拼音·臺灣正體 luna_pinyin_tw # 朙月拼音·語句流 luna_pinyin_fluency 4. 通过import_tables来进行多个词典加载 查看luna_pinyin_simp.custom.yaml可以看到它指定了&#8221;translator/dictionary&#8221;: luna_pinyin.extended为词典方案，再查看luna_pinyin.extended.dict.yaml可以看到这个配置文件里import了其他词典 import_tables: - luna_pinyin - luna_pinyin.hanyu - luna_pinyin.poetry - luna_pinyin.cn_en 通过这种方法将所有词典文件都加载到输入法中 5. 修改luna_pinyin.extended.dict.yaml，增加zhwiki词典 [&#8230;]]]></description>
										<content:encoded><![CDATA[<h2>在RIME输入法中增加词典</h2>
<h3>1. RIME的配置目录</h3>
<p>Ubuntu/PopOS中位于：<code>~/.config/ibus/rime</code></p>
<h3>2. 下载词典文件</h3>
<p>使用git clone下载RIME扩充词库： https://github.com/rime-aca/dictionaries<br />
使用rime-install下载zhwiki词典：https://github.com/felixonmars/fcitx5-pinyin-zhwiki</p>
<h3>3. 将所有词库文件cp到RIME配置目录中</h3>
<pre><code class="line-numbers">cp *dict* ~/.config/ibus/rime/
</code></pre>
<h3>4. 增加一个custom配置文件用以调用词库</h3>
<p>在下载的RIME扩充词库目录中，有一个luna_pinyin.custom.yaml，当使用朙月拼音的时候可以直接使用该配置，但是我使用的是朙月拼音简化字方案，因此需要将该配置文件改名为：<br />
luna_pinyin_simp.custom.yaml</p>
<p>在这个配置文件中，可以看到输入法的对应</p>
<pre><code class="line-numbers"># 附朙月拼音系列方案與其對應的 id 一覽表：
# 輸入方案  id
# 朙月拼音  luna_pinyin
# 朙月拼音·简化字  luna_pinyin_simp
# 朙月拼音·臺灣正體 luna_pinyin_tw
# 朙月拼音·語句流  luna_pinyin_fluency
</code></pre>
<h3>4. 通过import_tables来进行多个词典加载</h3>
<p>查看luna_pinyin_simp.custom.yaml可以看到它指定了&#8221;translator/dictionary&#8221;: luna_pinyin.extended为词典方案，再查看luna_pinyin.extended.dict.yaml可以看到这个配置文件里import了其他词典</p>
<pre><code class="line-numbers">import_tables:
  - luna_pinyin
  - luna_pinyin.hanyu
  - luna_pinyin.poetry
  - luna_pinyin.cn_en

</code></pre>
<p>通过这种方法将所有词典文件都加载到输入法中</p>
<h3>5. 修改luna_pinyin.extended.dict.yaml，增加zhwiki词典</h3>
<pre><code class="line-numbers">import_tables:
  - luna_pinyin
  - luna_pinyin.hanyu
  - luna_pinyin.poetry
  - luna_pinyin.cn_en
  - zhwiki
</code></pre>
<h3>6. 重新部署RIME输入法</h3>
<p>右键点击RIME的图标选择“部署”。</p>
<p>BTW：如果要修改输入法备选字的个数（比如从默认5个修改为7个），需要创建default.custom.yaml，并写入：</p>
<pre><code class="line-numbers"># default.custom.yaml
patch:
  "menu/page_size": 7 
</code></pre>
<p>参考文档： https://blog.mikelyou.com/2020/07/31/rime-input/</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbform.com/2024/08/20/how-to-add-dictionaries-to-rime-input-method-on-ubuntu-pop-os/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4463</post-id>	</item>
		<item>
		<title>How to move WSL distro in Windows 11 to another drive</title>
		<link>https://www.dbform.com/2024/01/05/how-to-move-wsl-distro-in-windows-11-to-another-drive/</link>
					<comments>https://www.dbform.com/2024/01/05/how-to-move-wsl-distro-in-windows-11-to-another-drive/#respond</comments>
		
		<dc:creator><![CDATA[kamus]]></dc:creator>
		<pubDate>Fri, 05 Jan 2024 07:44:34 +0000</pubDate>
				<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Windows 11]]></category>
		<category><![CDATA[WSL]]></category>
		<guid isPermaLink="false">https://www.dbform.com/?p=4450</guid>

					<description><![CDATA[Check the all steps screenshot as below.]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-jetpack-markdown"><h2>Introduction:</h2>
<p>In the world of development and system administration, Windows Subsystem for Linux (WSL) has become a valuable tool. It allows users to run a Linux distribution alongside their Windows environment, opening up a world of possibilities for developers and administrators. In this article, we’ll guide you through the process of migrating a WSL instance, using a real-world example, step by step.</p>
<h2>Prerequisites:</h2>
<p>Before we begin, ensure that you have the following prerequisites in place:</p>
<ul>
<li>Windows 10 or later with WSL installed.</li>
<li>An existing WSL instance (in our case, Ubuntu).</li>
<li>Sufficient storage space for the migration.</li>
</ul>
<h2>Step 1: Create a Target Directory</h2>
<p>To start the migration process, we need a target directory to store the migrated WSL instance. In PowerShell, use the ‘mkdir’ command to create this directory. In our example, we create a directory named ‘D:\WSL\Ubuntu’:</p>
<pre><code class="language-powershell">mkdir -p D:\WSL\Ubuntu
</code></pre>
<h2>Step 2: List All Running WSL Instances</h2>
<p>Before we proceed further, let’s list all the running WSL instances. The following command will display a list of all WSL instances, including their state and version:</p>
<pre><code class="language-powershell">wsl -l --all -v
</code></pre>
<h2>Step 3: Export the Source WSL Instance</h2>
<p>Now, let’s export the source WSL instance (in our case, ‘Ubuntu’) into a tar file. This step automatically shuts down the WSL instance and restarts it after the export:</p>
<pre><code class="language-powershell">wsl --export Ubuntu D:\WSL\Ubuntu.tar
</code></pre>
<h2>Step 4: Unregister the Source WSL Instance</h2>
<p>Once the export is complete, we need to unregister the source WSL instance to avoid conflicts. Use the following command:</p>
<pre><code class="language-powershell">wsl --unregister Ubuntu
</code></pre>
<h2>Step 5: Confirm Unregistration</h2>
<p>To confirm that the source WSL instance has been successfully unregistered, run the following command:</p>
<pre><code class="language-powershell">wsl -l --all -v
</code></pre>
<h2>Step 6: Import into the Target Directory</h2>
<p>Now it’s time to import the previously exported WSL instance into the target directory. In this step, we specify the target directory and version (in our case, version 2):</p>
<pre><code class="language-powershell">wsl --import Ubuntu D:\WSL\Ubuntu D:\WSL\Ubuntu.tar --version 2
</code></pre>
<h2>Step 7: Verify the Migration</h2>
<p>To ensure that the migration was successful, list all WSL instances once again:</p>
<pre><code class="language-powershell">wsl -l --all -v
</code></pre>
<h2>Step 8: Access the Migrated WSL Instance</h2>
<p>Now, you can access the migrated WSL instance by using the following command:</p>
<pre><code class="language-powershell">wsl -d Ubuntu
</code></pre>
<h2>Conclusion:</h2>
<p>Migrating WSL instances is a powerful way to manage and organize your development environments. By following these steps, you can seamlessly move your WSL instances to different directories or machines, ensuring flexibility and efficiency in your development workflow. Keep in mind that WSL provides a bridge between Windows and Linux, allowing you to enjoy the best of both worlds.</p>
</div>



<p>Check the all steps screenshot as below.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># create target directory
PS C:\Users\kamus> mkdir -p D:\WSL\Ubuntu

# List all the wsl running
PS C:\Users\kamus> wsl -l --all -v
  NAME                   STATE           VERSION
* Ubuntu                 Running         2
  docker-desktop         Stopped         2
  docker-desktop-data    Stopped         2
  
# Export source wsl
PS C:\Users\kamus> wsl --export Ubuntu D:\WSL\Ubuntu.tar

# When doing export, wsl will be shutdown automatically and restart after exporting
PS C:\Users\kamus> wsl -l --all -v
  NAME                   STATE           VERSION
* Ubuntu                 Running         2
  docker-desktop         Stopped         2
  docker-desktop-data    Stopped         2
  
# Unregister the source wsl
PS C:\Users\kamus> wsl --unregister Ubuntu
正在注销...

# Check unregister is successful
PS C:\Users\kamus> wsl -l --all -v
  NAME                   STATE           VERSION
* docker-desktop         Stopped         2
  docker-desktop-data    Stopped         2
  
# Import into the target directory
PS C:\Users\kamus> wsl --import Ubuntu D:\WSL\Ubuntu D:\WSL\Ubuntu.tar --version 2

# Check results
PS C:\Users\kamus> wsl -l --all -v
  NAME                   STATE           VERSION
* docker-desktop         Stopped         2
  Ubuntu                 Stopped         2
  docker-desktop-data    Stopped         2
PS C:\Users\kamus> wsl -d Ubuntu
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.10.102.1-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Fri Jan  5 14:40:25 JST 2024

  System load:  0.68               Processes:             8
  Usage of /:   2.0% of 250.98GB   Users logged in:       0
  Memory usage: 4%                 IPv4 address for eth0: 172.28.208.11
  Swap usage:   0%


0 updates can be applied immediately.


The list of available updates is more than a week old.
To check for new updates run: sudo apt update


This message is shown once a day. To disable it please create the
/root/.hushlogin file.
root@Kamus-Trident:/mnt/c/Users/kamus# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
root@Kamus-Trident:/mnt/c/Users/kamus#</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbform.com/2024/01/05/how-to-move-wsl-distro-in-windows-11-to-another-drive/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4450</post-id>	</item>
		<item>
		<title>Unlocking the Power: Key Features of MogDB</title>
		<link>https://www.dbform.com/2023/10/10/unlocking-the-power-key-features-of-mogdb/</link>
					<comments>https://www.dbform.com/2023/10/10/unlocking-the-power-key-features-of-mogdb/#comments</comments>
		
		<dc:creator><![CDATA[kamus]]></dc:creator>
		<pubDate>Tue, 10 Oct 2023 05:02:37 +0000</pubDate>
				<category><![CDATA[MogDB]]></category>
		<guid isPermaLink="false">https://www.dbform.com/?p=4434</guid>

					<description><![CDATA[MogDB is an advanced distributed relational database management system that offers high performance, high availability, ease of maintenance, compatibility, and AI capabilities. ]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Introduction to MogDB</h2>



<p><a href="https://www.mogdb.io">MogDB</a> is a cutting-edge distributed relational database management system that offers an array of powerful features designed to meet the needs of modern businesses. With its high performance, availability, maintainability, compatibility, and AI capabilities, MogDB stands out as a top choice for database administrators, developers, and IT professionals.</p>



<p>One of the key selling points of MogDB is its ability to deliver exceptional performance. This is achieved through various innovative features such as the <a href="https://docs.mogdb.io/en/mogdb/v2.0/2-optimizer-cost-constants/">Cost-Based Optimizer</a> (CBO) optimizer, which intelligently chooses the most efficient execution plans for queries. Additionally, MogDB utilizes a <a href="https://docs.mogdb.io/en/mogdb/v3.1/3-vectorized-engine/">vectorized engine</a> that processes data in batches instead of row by row, resulting in significant performance improvements. The <a href="https://docs.mogdb.io/en/mogdb/v3.0/5-adaptive-compression">adaptive compression</a> feature further enhances performance by reducing storage requirements and minimizing I/O operations.</p>



<p>In terms of availability, MogDB offers robust solutions to ensure uninterrupted access to critical data. It supports <a href="https://en.wikipedia.org/wiki/Master-slave_replication">master-slave replication</a>, allowing for automatic failover in case of primary node failure. <a href="https://docs.mogdb.io/en/mogdb/v2.1/2-logical-replication">Logical replication</a> enables real-time data synchronization across multiple databases, while <a href="https://docs.mogdb.io/en/mogdb/v2.1/5-physical-backup">physical backup</a> provides reliable data protection. <a href="https://docs.mogdb.io/en/mogdb/v3.0/9-delayed-replay">Delayed replay</a> allows for easy recovery from accidental data corruption or deletion.</p>



<p>Maintaining a database can be complex and time-consuming. However, MogDB simplifies this process with its advanced maintainability features. The <a href="https://docs.mogdb.io/en/mogdb/v3.0/upgrade-guide/">grey upgrade</a> feature allows for seamless upgrades without interrupting service availability. <a href="https://docs.mogdb.io/en/mogdb/v3.1/3-slow-sql-diagnosis">Slow SQL diagnosis</a> helps identify and optimize poorly performing queries, improving overall system efficiency. <a href="https://docs.mogdb.io/en/mogdb/v2.1/5-system-kpi-aided-diagnosis/">System KPI diagnosis</a> provides insights into system health and performance metrics, enabling proactive maintenance and troubleshooting. Fault diagnosis helps pinpoint issues quickly and accurately.</p>



<p>Compatibility is another area where MogDB excels. It supports various SQL features and ensures compatibility with popular database systems such as Oracle and MySQL. This makes it easier for organizations to migrate their existing applications or leverage their existing SQL knowledge without major modifications.</p>



<p>MogDB also boasts impressive AI capabilities that set it apart from traditional databases. The AI4DB feature enables autonomous database operations, automating routine tasks and optimizing performance based on machine learning algorithms. DB4AI allows for database-driven AI, empowering organizations to leverage their data for advanced analytics and machine learning applications. Additionally, the ABO optimizer intelligently adapts query execution plans based on real-time data statistics, further enhancing performance.</p>



<h2 class="wp-block-heading">High Performance Features</h2>



<p>MogDB is designed to deliver exceptional performance, ensuring that your database operations run smoothly and efficiently. With its cutting-edge features, MogDB offers unparalleled speed and optimization capabilities.</p>



<p>One of the key high-performance features of MogDB is the Cost-Based Optimizer (CBO). This optimizer leverages advanced algorithms and statistical models to determine the most efficient execution plan for queries. By analyzing query statistics and data distribution, the CBO can make intelligent decisions on how to execute queries in the most optimal way. This results in faster query processing times and improved overall performance.</p>



<p>In addition to the CBO optimizer, MogDB also utilizes a vectorized engine. This engine takes advantage of modern CPU architectures by performing operations on entire vectors of data at once, rather than processing individual elements sequentially. As a result, complex queries that involve large datasets can be executed more quickly and efficiently.</p>



<p>Another feature that contributes to MogDB&#8217;s high performance is adaptive compression. This feature dynamically adjusts the level of compression applied to data based on its characteristics and usage patterns. By compressing data when it is not actively being accessed or modified, MogDB can reduce storage requirements and improve I/O performance. When data needs to be accessed or modified, it is decompressed on-the-fly for seamless operations.</p>



<p>Parallel query optimization is yet another powerful feature offered by MogDB. This feature allows queries to be divided into smaller tasks that can be executed simultaneously across multiple cores or nodes in a distributed environment. By leveraging parallelism, MogDB can significantly speed up query processing times for large datasets or complex queries.</p>



<p>With these high-performance features combined, MogDB ensures that your database operations are lightning-fast and efficient. Whether you&#8217;re running simple CRUD operations or complex analytical queries, you can rely on MogDB to deliver exceptional performance every time.</p>



<p>It&#8217;s worth noting that while these high-performance features greatly enhance the speed and efficiency of MogDB, they do not compromise on data integrity or reliability. MogDB is built with a strong focus on ACID (Atomicity, Consistency, Isolation, Durability) principles, ensuring that your data remains consistent and reliable even under high-performance workloads.</p>



<h2 class="wp-block-heading">High Availability Features</h2>



<p>Ensuring high availability is crucial for any database management system, and MogDB excels in this aspect with its robust set of features. Let&#8217;s dive into the key high availability features that make MogDB a reliable choice for businesses.</p>



<p><strong>Master-slave replication for data redundancy</strong></p>



<p>MogDB offers master-slave replication, a powerful feature that enhances data redundancy and fault tolerance. With this feature, changes made to the master node are automatically replicated to one or more slave nodes. In the event of a failure or outage on the master node, one of the slave nodes can seamlessly take over as the new master, ensuring uninterrupted service availability. This replication mechanism not only provides data redundancy but also improves read scalability by allowing read operations to be distributed across multiple nodes.</p>



<p><strong>Logical replication for real-time data synchronization</strong></p>



<p>In addition to master-slave replication, MogDB supports logical replication, enabling real-time data synchronization between databases. This feature allows specific tables or even subsets of tables to be replicated from one database instance to another. By capturing and propagating changes at the logical level rather than replicating entire physical blocks, logical replication minimizes network traffic and reduces latency. It enables businesses to maintain up-to-date replicas of their databases for reporting purposes or offloading read-intensive workloads without impacting the performance of the primary database.</p>



<p><strong>Physical backup for data protection</strong></p>



<p>Data protection is paramount in any database system, and MogDB addresses this need through its physical backup feature. With physical backups, administrators can create full copies of their databases at a specific point in time. These backups capture both the schema and data files, ensuring comprehensive recovery options in case of hardware failures, user errors, or other catastrophic events. MogDB&#8217;s physical backup mechanism provides flexibility by allowing backups to be stored on different storage devices or even transferred to remote locations for disaster recovery purposes.</p>



<p><strong>Delayed replay for data recovery</strong></p>



<p>MogDB includes a delayed replay feature that allows administrators to recover data from a specific point in time. This feature is particularly useful in scenarios where accidental data deletions or modifications occur and need to be rolled back. By leveraging the transaction log, MogDB can replay changes up until a certain point, effectively restoring the database to its state prior to the incident. The delayed replay feature provides an additional layer of protection against human errors or malicious activities, ensuring that businesses can quickly recover from data-related incidents.</p>



<p>In summary, MogDB offers a comprehensive set of high availability features that guarantee reliability and continuous operation for businesses. The master-slave replication ensures data redundancy and read scalability, while logical replication enables real-time data synchronization for reporting or offloading purposes. Physical backups and delayed replay provide robust data protection mechanisms, allowing administrators to recover from hardware failures or user errors effectively. With these high availability features, MogDB empowers organizations with the confidence that their critical databases will remain accessible and resilient even in the face of unexpected challenges.</p>



<p>*[E-A-T]: Expertise, Authoritativeness, Trustworthiness</p>



<h2 class="wp-block-heading">Maintainability Features</h2>



<p>Maintainability is a crucial aspect of any database management system, and MogDB excels in this area with its array of innovative features. These features are designed to ensure seamless system updates, optimize performance, monitor and analyze system KPIs, and resolve any potential faults. Let&#8217;s explore these maintainability features in detail.</p>



<p>One of the standout maintainability features of MogDB is the grey upgrade capability. This feature allows for seamless system updates without interrupting ongoing operations. With grey upgrade, administrators can apply patches, upgrades, or even major version changes to MogDB without causing downtime or disrupting user access. This ensures that businesses can keep their databases up-to-date with the latest enhancements and security fixes while minimizing any potential disruptions to their operations.</p>



<p>Another essential maintainability feature offered by MogDB is slow SQL diagnosis. Slow SQL queries can significantly impact database performance and user experience. MogDB addresses this issue by providing comprehensive tools for identifying and optimizing slow SQL queries. The system analyzes query execution plans, identifies bottlenecks, and suggests optimizations to improve query performance. By pinpointing problematic queries and optimizing them, administrators can enhance overall database performance and ensure smooth operation.</p>



<p>System KPI diagnosis is another vital component of MogDB&#8217;s maintainability arsenal. Monitoring key performance indicators (KPIs) is crucial for understanding the health and efficiency of a database system. MogDB provides robust tools for monitoring and analyzing various KPIs such as CPU utilization, memory usage, disk I/O, network traffic, and more. Administrators can set up custom alerts based on predefined thresholds to proactively identify any anomalies or potential issues before they impact the system&#8217;s performance or availability.</p>



<p>In addition to diagnosing slow SQL queries and monitoring KPIs, MogDB also offers fault diagnosis capabilities. When an issue arises within the database system, it is essential to quickly identify the root cause and resolve it efficiently. MogDB provides advanced diagnostic tools that help administrators identify and troubleshoot various types of faults, including hardware failures, network issues, software bugs, or configuration problems. By quickly identifying and resolving faults, administrators can minimize downtime and ensure the continuous availability of their database system.</p>



<h2 class="wp-block-heading">Compatibility Features</h2>



<p>MogDB offers a wide range of compatibility features that make it a versatile and flexible choice for database administrators, developers, and IT professionals. One of the key compatibility features is its support for various SQL features. With MogDB, you can leverage the full power of SQL and take advantage of advanced querying capabilities to meet your specific business needs.</p>



<p>In addition to its support for SQL features, MogDB also provides seamless compatibility with Oracle databases. This compatibility feature allows for easy migration from Oracle to MogDB without any major disruptions or changes to your existing applications. The transition process is smooth and hassle-free, ensuring that you can quickly start benefiting from the high-performance and highly available nature of MogDB.</p>



<p>Another compatibility feature offered by MogDB is its support for MySQL databases. This means that you can seamlessly integrate MogDB into your existing MySQL infrastructure without any major modifications. Whether you are running applications that rely on MySQL or have data stored in MySQL databases, MogDB ensures a seamless integration process, allowing you to leverage the advanced capabilities and performance enhancements provided by MogDB.</p>



<p>The compatibility features of MogDB not only enable smooth transitions and integrations but also ensure that your existing applications continue to function seamlessly with minimal changes required. This level of compatibility reduces the effort and time required for migration or integration projects, allowing you to focus on other critical aspects of your business.</p>



<p>With its comprehensive set of compatibility features, MogDB provides a robust solution that meets the diverse needs of different industries and applications. Whether you are working with complex SQL queries, migrating from Oracle databases, or integrating with MySQL infrastructure, MogDB offers the flexibility and reliability needed to ensure a successful deployment.</p>



<h2 class="wp-block-heading">AI Capabilities</h2>



<p>MogDB stands out among other distributed relational database management systems due to its advanced AI capabilities. These capabilities empower organizations to leverage the power of artificial intelligence for autonomous database operations, database-driven AI, and improved performance through the ABO optimizer.</p>



<h3 class="wp-block-heading">AI4DB for Autonomous Database Operations</h3>



<p>With MogDB&#8217;s AI4DB feature, organizations can enhance their operational efficiency by automating various database tasks. This includes automated performance tuning, query optimization, and workload management. The AI algorithms embedded within MogDB continuously monitor the system&#8217;s performance metrics and automatically adjust configurations to optimize resource allocation and improve overall database performance.</p>



<p>AI4DB also plays a crucial role in self-healing mechanisms. It can detect anomalies or potential issues within the database environment and take proactive measures to resolve them before they impact critical business operations. By leveraging machine learning algorithms, MogDB can identify patterns in historical data and predict potential failures or bottlenecks, allowing administrators to take preventive actions.</p>



<p>Furthermore, AI4DB enables intelligent data compression techniques that optimize storage utilization without compromising query performance. By analyzing data access patterns and applying advanced compression algorithms, MogDB reduces storage costs while ensuring fast data retrieval.</p>



<h3 class="wp-block-heading">DB4AI for Database-Driven AI</h3>



<p>MogDB&#8217;s DB4AI feature allows organizations to seamlessly integrate their databases with artificial intelligence applications. This empowers businesses to unlock valuable insights from their vast amounts of structured and unstructured data.</p>



<p>By providing native support for popular machine learning frameworks such as TensorFlow and PyTorch, MogDB simplifies the process of training and deploying AI models directly within the database environment. This eliminates the need for complex data pipelines or costly data transfers between different systems.</p>



<p>With DB4AI, organizations can leverage the full potential of their databases by performing real-time analytics on large volumes of data. They can train predictive models using historical data stored in MogDB and make accurate predictions based on real-time information ingested into the database. This enables businesses to make data-driven decisions faster and gain a competitive edge in today&#8217;s fast-paced market.</p>



<h3 class="wp-block-heading">ABO Optimizer for Improved Performance</h3>



<p>MogDB&#8217;s AI capabilities extend to its query optimization engine through the Adaptive Bitwise Optimization (ABO) optimizer. This innovative feature leverages machine learning techniques to intelligently optimize query execution plans based on historical performance data.</p>



<p>The ABO optimizer continuously analyzes query patterns, execution statistics, and system resources to identify optimal query plans. By learning from past experiences, it can adaptively adjust execution strategies to improve overall query performance. This results in faster response times and more efficient resource utilization.</p>



<p>Furthermore, the ABO optimizer reduces the need for manual tuning by automatically selecting the most appropriate join methods, access paths, and index usage based on the characteristics of each query. This simplifies database administration tasks and allows administrators to focus on higher-level optimizations rather than fine-tuning individual queries.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>The key features of MogDB make it a powerful and versatile option for database administrators, developers, and IT professionals. Its high performance capabilities, such as the CBO optimizer, vectorized engine, adaptive compression, and parallel query optimization, ensure that users can process large amounts of data quickly and efficiently. This is crucial in today&#8217;s fast-paced business environment where time is of the essence.</p>



<p>Furthermore, MogDB offers high availability features that guarantee uninterrupted access to critical data. The master-slave replication, logical replication, physical backup, and delayed replay functionalities ensure that data is always accessible even in the event of system failures or disasters. This level of reliability instills confidence in users and provides peace of mind knowing that their data is safe.</p>



<p>Maintainability is another key aspect of MogDB. With features like grey upgrade, slow SQL diagnosis, system KPI diagnosis, and fault diagnosis tools, administrators can easily identify and resolve issues within the database system. This streamlines maintenance processes and minimizes downtime for businesses.</p>



<p>Compatibility with various SQL features as well as Oracle and MySQL compatibility allows for seamless integration with existing systems and applications. This eliminates the need for extensive modifications or rewrites when migrating from other database management systems to MogDB.</p>



<p>In addition to these impressive features, MogDB also offers AI capabilities through AI4DB for autonomous database operations and DB4AI for database-driven AI. These advanced capabilities enable users to leverage artificial intelligence technologies within their databases to enhance performance and gain valuable insights from their data.</p>



<p>Overall, MogDB stands out as a highly performant, highly available, easy-to-use distributed relational database management system with a wide range of features tailored to meet the needs of modern businesses. Its compatibility with existing systems and applications combined with its AI capabilities make it an attractive choice for organizations across industries. Whether you are a database administrator looking for improved performance or a developer seeking seamless integration options, MogDB has you covered. Trust in MogDB to unlock the power of your data.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbform.com/2023/10/10/unlocking-the-power-key-features-of-mogdb/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4434</post-id>	</item>
		<item>
		<title>如何高效使用 GitHub Copilot</title>
		<link>https://www.dbform.com/2023/04/12/%e5%a6%82%e4%bd%95%e9%ab%98%e6%95%88%e4%bd%bf%e7%94%a8-github-copilot/</link>
					<comments>https://www.dbform.com/2023/04/12/%e5%a6%82%e4%bd%95%e9%ab%98%e6%95%88%e4%bd%bf%e7%94%a8-github-copilot/#respond</comments>
		
		<dc:creator><![CDATA[kamus]]></dc:creator>
		<pubDate>Wed, 12 Apr 2023 02:06:12 +0000</pubDate>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Copilot]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[OpenAI]]></category>
		<guid isPermaLink="false">https://www.dbform.com/?p=4410</guid>

					<description><![CDATA[如何高效使用 GitHub Copilot GitHub Copilot 是一款由 OpenAI 和 GitHub 联合开发的人工智能编程助手，基于 GPT-4 模型。它可以帮助你编写代码、提供代码建议、自动完成代码片段等，大大提高编程效率。下面是如何高效使用 GitHub Copilot 的一些建议。 1. 安装和配置 首先，要在你的代码编辑器中安装 GitHub Copilot 插件。目前，该插件支持 Visual Studio Code。在安装插件后，确保登录到你的 GitHub 账户，以便与 Copilot 服务同步。 2. 详细描述你的需求 在开始编写代码之前，尽量详细描述你想要实现的功能。GitHub Copilot 会根据你的描述生成相应的代码建议。你可以使用注释（例如 `//` 或 `/* */`）来描述需求，这样 Copilot 就会根据注释生成代码。 3. 利用代码建议 当你开始输入代码时，GitHub Copilot 会自动提供代码建议。这些建议可能包括函数、变量、类等。要高效地利用这些建议，你可以： &#8211; 在输入时检查建议，如果符合你的需求，就接受它； &#8211; 在需要时手动触发代码建议，例如按 `Ctrl+Space`（或其他编辑器指定的快捷键）； &#8211; 当 Copilot 生成的建议不完全符合需求时，可对其进行修改并尝试重新获取建议。 4. 学会与 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">如何高效使用 GitHub Copilot</h2>



<p>GitHub Copilot 是一款由 OpenAI 和 GitHub 联合开发的人工智能编程助手，基于 GPT-4 模型。它可以帮助你编写代码、提供代码建议、自动完成代码片段等，大大提高编程效率。下面是如何高效使用 GitHub Copilot 的一些建议。</p>



<h2 class="wp-block-heading">1. 安装和配置</h2>



<p>首先，要在你的代码编辑器中安装 GitHub Copilot 插件。目前，该插件支持 Visual Studio Code。在安装插件后，确保登录到你的 GitHub 账户，以便与 Copilot 服务同步。</p>



<h2 class="wp-block-heading">2. 详细描述你的需求</h2>



<p>在开始编写代码之前，尽量详细描述你想要实现的功能。GitHub Copilot 会根据你的描述生成相应的代码建议。你可以使用注释（例如 `//` 或 `/* */`）来描述需求，这样 Copilot 就会根据注释生成代码。</p>



<h2 class="wp-block-heading">3. 利用代码建议</h2>



<p>当你开始输入代码时，GitHub Copilot 会自动提供代码建议。这些建议可能包括函数、变量、类等。要高效地利用这些建议，你可以：</p>



<p>&#8211; 在输入时检查建议，如果符合你的需求，就接受它；</p>



<p>&#8211; 在需要时手动触发代码建议，例如按 `Ctrl+Space`（或其他编辑器指定的快捷键）；</p>



<p>&#8211; 当 Copilot 生成的建议不完全符合需求时，可对其进行修改并尝试重新获取建议。</p>



<h2 class="wp-block-heading">4. 学会与 Copilot 交流</h2>



<p>GitHub Copilot 可以理解简单的自然语言，因此在编写代码时，你可以像与人交流一样与它交流。例如，你可以在注释中写下 “创建一个计算两数之和的函数”，Copilot 会生成相应的代码。学会与 Copilot 交流有助于提高编程效率。</p>



<h2 class="wp-block-heading">5. 保持代码整洁</h2>



<p>在使用 GitHub Copilot 时，要保持代码整洁，以便更容易地理解生成的代码。尽量使用清晰的命名规范，保持一致的缩进和代码风格。这样，当 Copilot 生成代码时，它也会遵循你的代码风格。</p>



<h2 class="wp-block-heading">6. 仔细审查生成的代码</h2>



<p>虽然 GitHub Copilot 通常能生成有效的代码，但它并不总是完美的。在接受 Copilot 的建议之前，务必仔细审查代码，确保其正确性、安全性和性能。如有需要，对生成的代码进行调整以满足项目需求。</p>



<h2 class="wp-block-heading">7. 利用 Copilot 学习新技能</h2>



<p>GitHub Copilot 不仅是一个编程助手，还是一个学习新技能的好帮手。你可以尝试让 Copilot 生成你不熟悉的编程语言或库的代码，通过阅读和理解生成的代码来学习新知识。此外，你还可以在注释中询问 Copilot 有关特定函数或方法的用途，它通常会提供有关信息。</p>



<h2 class="wp-block-heading">8. 与团队协作</h2>



<p>在团队项目中使用 GitHub Copilot 时，确保与团队成员进行充分沟通。在共享代码库中，将 Copilot 生成的代码与团队成员共享，并征求他们的反馈。这有助于确保生成的代码符合项目需求和团队标准。</p>



<h2 class="wp-block-heading">9. 自定义代码生成</h2>



<p>GitHub Copilot 允许你对生成的代码进行自定义。通过修改代码片段和调整参数，你可以让 Copilot 更好地适应你的项目需求。在实践中尝试不同的自定义设置，以找到最适合你的配置。</p>



<h2 class="wp-block-heading">10. 反馈与改进</h2>



<p>GitHub Copilot 是一个持续学习和改进的工具。如果你发现生成的代码有问题，或者有优化空间，不要犹豫，向开发团队提供反馈。这有助于 Copilot 变得更加智能，为你提供更好的编程体验。</p>



<p>总之，GitHub Copilot 是一款强大的编程助手，可以帮助你提高编程效率。要充分利用它，需要学会与 Copilot 交流，仔细审查生成的代码，并与团队成员协作。通过不断实践和反馈，你将能够更好地掌握如何高效使用 GitHub Copilot。</p>



<p></p>



<h2 class="wp-block-heading">GitHub Copilotを効果的に使うためのヒントを紹介します。</h2>



<p>練習とフィードバックを頻繁にする。Copilotとのインタラクションを増やし、前向きなフィードバックと建設的なフィードバックを提供することで、あなたのコーディングスタイルと好みをより理解するのに役立ちます。</p>



<p>コメントにコンテキストを追加する。関数やクラスに詳細なコメントを付け加えることで、Copilotにより意図したコードを生成するためのコンテキストを提供できます。</p>



<p>ショートカットを上手く使う。Tabキーで提案を受け入れ、Escキーで提案をスキップできます。これによりワークフローを最適化できます。</p>



<p>定期的にアップデートする。GitHubは常にCopilotの改善に取り組んでいるので、最新バージョンを使用することで新機能を利用できます。</p>



<p>設定を最適化する。提案の頻度、受け入れ言語などの設定を調整して、ユーザーエクスペリエンスを最適化できます。</p>



<p>コピーコードをリファクタリングする。Copilotは時には重複コードを生成するので、コードをよりシンプルにリファクタリングすることに注意しましょう。</p>



<p>思考の時間を取る。常にCopilotの提案を急いで受け入れるのではなく、自分でコードを考え改善する時間を取ることが大切です。</p>



<p>チームと連携する。チームメンバーもCopilotについて知るようにし、使い方を共有してより良いコラボレーションができるようにしましょう。</p>



<p>コード補完を上手く利用する。コード補完は開発速度を上げてくれますが、自分でどのタイミングで使うか判断する必要があります。</p>



<p>新しい使い方を発見する。GitHub Copilotには多くのクリエイティブな使い方があるので、生産性を上げる新しい使い方を探求し続けましょう。</p>



<p></p>



<h2 class="wp-block-heading">Here are some tips for using GitHub Copilot effectively:</h2>



<p>Practice and provide feedback frequently. Interact with Copilot more, provide positive and constructive feedback, which can help it better understand your coding style and preferences.</p>



<p>Provide more context in comments. Adding detailed comments above functions and classes will give Copilot more information to generate code that better matches expectations.</p>



<p>Use shortcuts wisely. Use Tab to accept Copilot&#8217;s suggestions and Esc to skip suggestions. Shortcuts can optimize workflow.</p>



<p>Update regularly. GitHub is continuously optimizing Copilot. Updating to the latest version allows you to use Copilot&#8217;s new features.</p>



<p>Optimize settings. You can adjust settings like suggestion frequency, accepted languages, etc. to optimize the user experience.</p>



<p>Refactor duplicated code. Copilot sometimes generates duplicate code, pay attention to refactoring the code to be more concise.</p>



<p>Take time to think. Don&#8217;t always hastily accept Copilot&#8217;s suggestions, take time to think and improve the code yourself.</p>



<p>Collaborate with your team. Let team members also understand Copilot for better collaboration. Everyone can share usage experiences.</p>



<p>Make good use of code completion. Copilot&#8217;s code completion can speed up development, but you still need to judge when to use it.</p>



<p>Discover more use cases. GitHub Copilot has many creative use cases, you can keep exploring new use cases to improve work efficiency.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbform.com/2023/04/12/%e5%a6%82%e4%bd%95%e9%ab%98%e6%95%88%e4%bd%bf%e7%94%a8-github-copilot/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4410</post-id>	</item>
		<item>
		<title>MogDB ASH机制浅析</title>
		<link>https://www.dbform.com/2022/10/24/mogdb-ash%e6%9c%ba%e5%88%b6%e6%b5%85%e6%9e%90/</link>
					<comments>https://www.dbform.com/2022/10/24/mogdb-ash%e6%9c%ba%e5%88%b6%e6%b5%85%e6%9e%90/#respond</comments>
		
		<dc:creator><![CDATA[kamus]]></dc:creator>
		<pubDate>Mon, 24 Oct 2022 09:54:05 +0000</pubDate>
				<category><![CDATA[MogDB]]></category>
		<category><![CDATA[ash]]></category>
		<guid isPermaLink="false">https://www.dbform.com/?p=4386</guid>

					<description><![CDATA[ASH实际上是Oracle数据库中的一个名词，全称是Active Session History，这项功能会在数据库内存和持久化的系统表里都记录下每隔一定周期的活跃会话的信息，内存中的数据重启数据库以后会清空，但是持久化的系统表数据会长期保留。因为ASH的存在，所以当数据库发生故障或者经历性能问题，需要回溯定位问题原因的时候，非常有帮助。

在MogDB中，同样实现了ASH能力。]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">什么是ASH</h2>



<p>ASH实际上是Oracle数据库中的一个名词，全称是Active Session History，这项功能会在数据库内存和持久化的系统表里都记录下每隔一定周期的活跃会话的信息，内存中的数据重启数据库以后会清空，但是持久化的系统表数据会长期保留。因为ASH的存在，所以当数据库发生故障或者经历性能问题，需要回溯定位问题原因的时候，非常有帮助。</p>



<p>在MogDB中，同样实现了ASH能力。</p>



<h2 class="wp-block-heading">MogDB的ASH能力</h2>



<p>分为两部分来阐述。社区开源版本openGauss的能力和MogDB企业版本增强的能力。</p>



<p>首先是社区开源版本openGauss本身具备的ASH能力，MogDB是完全继承的。</p>



<p>数据库中提供了两个主要视图，分别是<code>dbe_perf.LOCAL_ACTIVE_SESSION</code>和<code>GS_ASP</code>，其中LOCAL_ACTIVE_SESSION是内存中的表，而GS_ASP则是持久化保存的表。在这两个视图中包含了当前活动会话的采样信息。</p>



<p>有以下几个主要参数，会对ASH功能产生影响：</p>



<p><a href="https://docs.mogdb.io/zh/mogdb/v3.0/27-system-performance-snapshot#enable_asp"><code>enable_asp</code></a> 设置为on或者off，表示是否开启ASH功能，默认为开启；</p>



<p><a href="https://docs.mogdb.io/zh/mogdb/v3.0/27-system-performance-snapshot#asp_sample_interval"><code>asp_sample_interval</code></a> 指定每次采样的间隔，默认为1s采样一次，如果想减轻采样压力，可以将该参数设置为更长间隔，最长允许设置为10s；</p>



<p><a href="https://docs.mogdb.io/zh/mogdb/v3.0/27-system-performance-snapshot#asp_sample_num"><code>asp_sample_num</code></a> 指定在内存表LOCAL_ACTIVE_SESSION中保留的样本总数，超过该数，将会触发将内存中的样本刷盘记录到GS_ASP系统表中的行为，默认为10万条。当发生刷盘行为后，LOCAL_ACTIVE_SESSION中的所有记录会被清空，重新开始采样；</p>



<p><a href="https://docs.mogdb.io/zh/mogdb/v3.0/27-system-performance-snapshot#asp_flush_rate"><code>asp_flush_rate</code></a> 指定哪些内存中的样本数据会被刷盘记录到GS_ASP表中，判断时会计算LOCAL_ACTIVE_SESSION中记录的sampleid字段值，其中 sampleid%asp_flush_rate == 0的记录会被标志为need_flush_sample=true，这些记录都会被持久化保存（在内核函数Asp::SubAspWorker中定义）。可以简单地理解为，该参数默认值为10，也就是1/10的样本会被持久化保存；</p>



<p><a href="https://docs.mogdb.io/zh/mogdb/v3.0/27-system-performance-snapshot#asp_retention_days"><code>asp_retention_days</code></a> 指定在GS_ASP中保留的数据的时限，默认为2天，最多7天。</p>



<p>其次是MogDB企业版增强的ASH能力，称为“SQL运行状态观测”，主要是通过在采样数据中增加SQL执行算子的采样来完成的。</p>



<p>MogDB在上述视图中增加了plan_node_id字段来记录每次采样时，SQL正在执行的算子情况，将该算子与其它性能视图中记录的SQL执行计划来关联，即可知道对于出现性能问题的SQL具体是慢在了执行计划的哪个步骤上。具体介绍可以参看文档：<a href="https://docs.mogdb.io/zh/mogdb/v3.0/22-sql-running-status-observation#sql%E8%BF%90%E8%A1%8C%E7%8A%B6%E6%80%81%E8%A7%82%E6%B5%8B">SQL运行状态观测</a>。</p>



<p>以下参数，会对企业版ASH功能产生影响：</p>



<p><a href="https://docs.mogdb.io/zh/mogdb/v3.0/13-load-management#resource_track_level"><code>resource_track_level</code></a> 参数指定为operator，则会开启算子采样能力，默认值是query，只会记录SQL级别采样。</p>



<h2 class="wp-block-heading">LOCAL_ACTIVE_SESSION视图</h2>



<p>该视图中已经记录了大量信息，包括用户关心的会话ID，等待事件，SQL query id （该值可以跟dbe_perf.statement_history表或者dbe_perf.statement_complex_runtime表进行关联，获取SQL的文本和执行计划）。</p>



<figure class="wp-block-image"><img decoding="async" src="https://s2.loli.net/2022/10/24/UZR4wcX8lyeDHS7.png" alt="image-20221024155531233"/></figure>



<p>以上字段列表中，plan_node_id只有在MogDB企业版数据库中才存在，openGauss社区开源版本不存在该字段。</p>



<h2 class="wp-block-heading">关于SQL执行计划的记录</h2>



<p>查询已经运行过的，或者正在执行的SQL的执行计划，是数据库运维工作中经常会遇到的需求。在MogDB中，以下视图中记录了SQL的执行计划。</p>



<p><code>dbe_perf.STATEMENT_HISTORY</code> 该视图中记录了已经运行结束的SQL的各种信息，同时包含了执行计划（query_plan字段）。</p>



<p><code>dbe_perf.STATEMENT_COMPLEX_RUNTIME</code> 该视图中记录了正在运行的SQL的各种信息，同时包含了执行计划（query_plan字段）。</p>



<p>但是要注意，记录SQL的执行计划，受到以下参数影响。</p>



<p><code>enable_resource_track</code> 该参数设置是否对资源进行监控，默认为on，如果设置为off，则不仅仅是执行计划，而是所有用户SQL的执行信息都不再追踪。包括在ASH视图LOCAL_ACTIVE_SESSION中也不再记录用户会话采样。</p>



<p><code>resource_track_cost</code> 该参数设置对于SQL语句进行资源监控的最小执行代价，只有高于该参数值的成本的SQL才会记录执行计划。</p>



<h2 class="wp-block-heading">一个综合各种视图的查询语句</h2>



<p>我们可以使用以下语句来获取正在执行的SQL的包括历史采样的所有信息。</p>



<pre class="wp-block-preformatted">select<br>    las.sample_time,<br>    las.application_name,<br>    las.unique_query_id,<br>    las.event,<br>    scr.query ,<br>    scr.query_plan<br>from<br>    dbe_perf.local_active_session las,<br>    dbe_perf.statement_complex_runtime scr<br>where<br>    las.thread_id = scr.pid<br>    and scr.pid &lt;&gt; pg_backend_pid();</pre>



<p>该SQL执行的结果示例如下。这个例子中有一个全表扫描的语句频繁执行，在多次采样中被记录下来，包含了SQL文本，执行计划，发起查询的客户端信息等，均可以查询到。这些信息将对性能诊断提供极大帮助。</p>



<figure class="wp-block-image"><img decoding="async" src="https://s2.loli.net/2022/10/24/MxBW7629sCSaGKp.png" alt="image-20221024183300024"/></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbform.com/2022/10/24/mogdb-ash%e6%9c%ba%e5%88%b6%e6%b5%85%e6%9e%90/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4386</post-id>	</item>
		<item>
		<title>Using MTK to migrate Oracle sample schema to MogDB</title>
		<link>https://www.dbform.com/2022/09/25/using-mtk-to-migrate-oracle-sample-schema-to-mogdb/</link>
					<comments>https://www.dbform.com/2022/09/25/using-mtk-to-migrate-oracle-sample-schema-to-mogdb/#respond</comments>
		
		<dc:creator><![CDATA[kamus]]></dc:creator>
		<pubDate>Sat, 24 Sep 2022 17:43:51 +0000</pubDate>
				<category><![CDATA[MogDB]]></category>
		<guid isPermaLink="false">https://www.dbform.com/?p=4378</guid>

					<description><![CDATA[Get the latest version MTK wget https://cdn-mogdb.enmotech.com/mtk/v2.6.3/mtk_2.6.3_linux_amd64.tar.gztar -xvf mtk_2.6.3_linux_amd64.tar.gz Generate MTK trial license online The trial license lasts for 1 month, every mail address can only gernerate one license, except the mail address domain is &#8220;enmotech.com&#8221;, using &#8220;enmotech.com&#8221; mail can repeatly genarate license. So if the clients want to try MTK more after 1 month, [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Get the latest version MTK</h2>



<pre class="wp-block-preformatted">wget https://cdn-mogdb.enmotech.com/mtk/v2.6.3/mtk_2.6.3_linux_amd64.tar.gz<br>tar -xvf mtk_2.6.3_linux_amd64.tar.gz</pre>



<h2 class="wp-block-heading">Generate MTK trial license online</h2>



<p>The trial license lasts for 1 month, every mail address can only gernerate one license, except the mail address domain is &#8220;enmotech.com&#8221;, using &#8220;enmotech.com&#8221; mail can repeatly genarate license. So if the clients want to try MTK more after 1 month, should contact the sales or pre-sales from Enmotech, to ask for another 1 month license.</p>



<pre class="wp-block-preformatted">[kamus@altlinux10 mtk_2.6.3_linux_amd64]$ ./mtk license gen<br>License File Not Found (default license.json)<br>The License code is invalid, start applying<br>✔ Email: kamus@enmotech.com█<br>Start applying for email kamus@enmotech.com authorization.<br>Start parsing the interface to return data.<br>Successful application for authorization. Please check the mail and save it as license.json.</pre>



<p>When get the mail, upload the attached license.json file to the MTK directory. Use <code>mtk -v</code> to check the license validation.</p>



<pre class="wp-block-preformatted">[kamus@altlinux10 mtk_2.6.3_linux_amd64]$ ./mtk -v<br>Using license file: /home/kamus/mogdb-tools/mtk_2.6.3_linux_amd64/license.json<br>Name: kamus@enmotech.com<br>Expiry: 2022-10-24 12:08:58.751194162 +0800 +0800<br>License key verified!<br>License checks OK!<br>​<br>MMMMMMMM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MMMMMMMMTTTTTTTTTTTTTTTTTTTTTTTKKKKKKKKK &nbsp;  KKKKKKK<br>M:::::::M &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; M:::::::MT:::::::::::::::::::::TK:::::::K &nbsp;  K:::::K<br>M::::::::M &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; M::::::::MT:::::::::::::::::::::TK:::::::K &nbsp;  K:::::K<br>M:::::::::M &nbsp; &nbsp; &nbsp; &nbsp; M:::::::::MT:::::TT:::::::TT:::::TK:::::::K &nbsp; K::::::K<br>M::::::::::M &nbsp; &nbsp; &nbsp; M::::::::::MTTTTTT  T:::::T  TTTTTTKK::::::K  K:::::KKK<br>M:::::::::::M &nbsp; &nbsp; M:::::::::::M &nbsp; &nbsp; &nbsp;  T:::::T &nbsp; &nbsp; &nbsp; &nbsp;  K:::::K K:::::K<br>M:::::::M::::M &nbsp; M::::M:::::::M &nbsp; &nbsp; &nbsp;  T:::::T &nbsp; &nbsp; &nbsp; &nbsp;  K::::::K:::::K<br>M::::::M M::::M M::::M M::::::M &nbsp; &nbsp; &nbsp;  T:::::T &nbsp; &nbsp; &nbsp; &nbsp;  K:::::::::::K<br>M::::::M  M::::M::::M  M::::::M &nbsp; &nbsp; &nbsp;  T:::::T &nbsp; &nbsp; &nbsp; &nbsp;  K:::::::::::K<br>M::::::M &nbsp; M:::::::M &nbsp; M::::::M &nbsp; &nbsp; &nbsp;  T:::::T &nbsp; &nbsp; &nbsp; &nbsp;  K::::::K:::::K<br>M::::::M &nbsp;  M:::::M &nbsp;  M::::::M &nbsp; &nbsp; &nbsp;  T:::::T &nbsp; &nbsp; &nbsp; &nbsp;  K:::::K K:::::K<br>M::::::M &nbsp; &nbsp; MMMMM &nbsp; &nbsp; M::::::M &nbsp; &nbsp; &nbsp;  T:::::T &nbsp; &nbsp; &nbsp;  KK::::::K  K:::::KKK<br>M::::::M &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; M::::::M &nbsp; &nbsp;  TT:::::::TT &nbsp; &nbsp;  K:::::::K &nbsp; K::::::K<br>M::::::M &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; M::::::M &nbsp; &nbsp;  T:::::::::T &nbsp; &nbsp;  K:::::::K &nbsp;  K:::::K<br>M::::::M &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; M::::::M &nbsp; &nbsp;  T:::::::::T &nbsp; &nbsp;  K:::::::K &nbsp;  K:::::K<br>MMMMMMMM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MMMMMMMM &nbsp; &nbsp;  TTTTTTTTTTT &nbsp; &nbsp;  KKKKKKKKK &nbsp;  KKKKKKK<br>​<br>Release version: v2.6.3<br>Git Commit hash: da0ed8ee<br>Git Commit Date: 2022-09-22T01:17:49Z<br>Git Tag &nbsp; &nbsp; &nbsp;  : v2.6.3<br>Build timestamp: 20220922011907</pre>



<h2 class="wp-block-heading">Install Oracle instant client</h2>



<p>MTK needs <a href="https://www.oracle.com/database/technologies/instant-client/downloads.html">Oracle instant client</a> to migrate Oracle objects to MogDB, in this tutorial, we will download <a href="https://download.oracle.com/otn_software/linux/instantclient/217000/instantclient-basic-linux.x64-21.7.0.0.0dbru.zip">Oracle Instant Client for Linux x86-64 Basic Package</a>. Unzip the downloaded file, set the proper <code>LD_LIBRARY_PATH</code> parameter.</p>



<pre class="wp-block-preformatted">export LD_LIBRARY_PATH=/home/kamus/instantclient_21_7:$LD_LIBRARY_PATH</pre>



<p>We will migrate a sample schema &#8220;customer_orders&#8221; to MogDB in this tutorial. the <a href="https://github.com/oracle-samples/db-sample-schemas">db-sample-schemas</a> scipts for Oracle can be downloaded from github.</p>



<figure class="wp-block-image"><img decoding="async" src="https://s2.loli.net/2022/09/24/mKnfuY28shRNI9X.png" alt="image-20220924140451621"/></figure>



<h2 class="wp-block-heading">Initialize migration project</h2>



<pre class="wp-block-preformatted">./mtk init-project -s oracle -t mogdb -n ora2mogdb</pre>



<h2 class="wp-block-heading">Modify MTK configuration file</h2>



<p>Modify the example MTK confiuration file stored in project_name_dir/config directory, check <a href="https://docs.mogdb.io/en/mtk/v2.0/mtk-parameter">MTK documentation</a> for the details of every parameter. The essenssial config sections for MTK is <code>source</code>, <code>target</code>, <code>object</code> .</p>



<p><code>source</code> section: is the connection defination for source database, MTK needs to query Oracle database dictionary to get DDL, so typically we should use DBA user, the default system user will be OK.</p>



<p><code>target</code> section: is the connection defination for target database.</p>



<p><code>object</code> section: for migrating all the objects in one schema, we just need to put schema name in <code>schemas</code> section.</p>



<p>The mtk.json config file will looks like:</p>



<pre class="wp-block-preformatted">{<br> &nbsp;  "source": {<br> &nbsp; &nbsp;  "type": "oracle",<br> &nbsp; &nbsp;  "connect": {<br> &nbsp; &nbsp; &nbsp;  "version": "",<br> &nbsp; &nbsp; &nbsp;  "host": "119.3.182.31",<br> &nbsp; &nbsp; &nbsp;  "user": "system",<br> &nbsp; &nbsp; &nbsp;  "port": 15221,<br> &nbsp; &nbsp; &nbsp;  "password": "oracle",<br> &nbsp; &nbsp; &nbsp;  "dbName": "ORACLE21C",<br> &nbsp; &nbsp; &nbsp;  "charset": "",<br> &nbsp; &nbsp; &nbsp;  "clientCharset": ""<br> &nbsp; &nbsp;  }<br> &nbsp;  },<br> &nbsp;  "target": {<br> &nbsp; &nbsp;  "type": "mogdb",<br> &nbsp; &nbsp;  "connect": {<br> &nbsp; &nbsp; &nbsp;  "version": "",<br> &nbsp; &nbsp; &nbsp;  "host": "127.0.0.1",<br> &nbsp; &nbsp; &nbsp;  "user": "co",<br> &nbsp; &nbsp; &nbsp;  "port": 26000,<br> &nbsp; &nbsp; &nbsp;  "password": "Enmo@123",<br> &nbsp; &nbsp; &nbsp;  "dbName": "postgres",<br> &nbsp; &nbsp; &nbsp;  "charset": "",<br> &nbsp; &nbsp; &nbsp;  "clientCharset": ""<br> &nbsp; &nbsp;  }<br> &nbsp;  },<br> &nbsp;  "object": {<br> &nbsp; &nbsp;  "tables": [],<br> &nbsp; &nbsp;  "schemas": ["co"],<br> &nbsp; &nbsp;  "excludeTable": {<br> &nbsp; &nbsp;  },<br> &nbsp; &nbsp;  "tableSplit": {<br> &nbsp; &nbsp;  }<br> &nbsp;  },<br> &nbsp;  "dataOnly": false,<br> &nbsp;  "schemaOnly": false<br>}</pre>



<p>We are planning to migrate all the objects in &#8220;CO&#8221; schema from Oracle database to the same user in MogDB, for testing purpose, we will not create a new database in MogDB, we create a new user &#8220;co&#8221; in default database postgres.</p>



<pre class="wp-block-preformatted">[omm@altlinux10 ~]$ gsql -d postgres -p 26000 -r<br>gsql ((MogDB 3.0.2 build 9bc79be5) compiled at 2022-09-18 00:37:49 commit 0 last mr  )<br>Non-SSL connection (SSL connection is recommended when requiring high-security)<br>Type "help" for help.<br>​<br>MogDB=# create user co identified by "Enmo@123";<br>CREATE ROLE</pre>



<h2 class="wp-block-heading">Start migration</h2>



<p>Now, we can start migration.</p>



<pre class="wp-block-preformatted">./mtk -c ora2mogdb/config/mtk.json</pre>



<h2 class="wp-block-heading">Check migration report</h2>



<p>Migration result report will be generated in project report directory, both in pure text format and HTML format, till now the HTML report is in Chinese, so I put the text format result into this tutorial.</p>



<pre class="wp-block-preformatted">-----------------------<br>ObjectName Type Summary<br>-----------------------<br><br>+------------------+-------------------+-------------------+--------+-----------+-------------+-------------+-------------+--------------------|-------------+<br>|       Type       |     StartTime     |      EndTime      | Status | Total Num | Success Num | Warring Num | Failed  Num |Failed(Invalid) Num | Time        |<br>+------------------+-------------------+-------------------+--------+-----------+-------------+-------------+-------------+--------------------|-------------+<br>|Schema            |2022-09-24 15:12:36|2022-09-24 15:12:36|finish  |1          |1            |0            |0            |0                   |282 ms       ｜<br>|Sequence          |2022-09-24 15:12:36|2022-09-24 15:12:36|finish  |0          |0            |0            |0            |0                   |210 ms       ｜<br>|ObjectType        |2022-09-24 15:12:36|2022-09-24 15:12:36|finish  |0          |0            |0            |0            |0                   |356 ms       ｜<br>|Queue             |2022-09-24 15:12:36|2022-09-24 15:12:37|finish  |0          |0            |0            |0            |0                   |177 ms       ｜<br>|Table             |2022-09-24 15:12:37|2022-09-24 15:12:47|finish  |7          |7            |0            |0            |0                   |9 s 952 ms   ｜<br>|TableData         |2022-09-24 15:12:47|2022-09-24 15:12:53|finish  |7          |7            |0            |0            |0                   |6 s 743 ms   ｜<br>|Index             |2022-09-24 15:12:53|2022-09-24 15:12:53|finish  |7          |7            |0            |0            |0                   |1 ms         ｜<br>|Constraint        |2022-09-24 15:12:53|2022-09-24 15:12:53|finish  |24         |23           |0            |1            |0                   |51 ms        ｜<br>|DBLink            |2022-09-24 15:12:53|2022-09-24 15:12:53|finish  |0          |0            |0            |0            |0                   |67 ms        ｜<br>|View              |2022-09-24 15:12:53|2022-09-24 15:12:54|finish  |4          |2            |0            |2            |0                   |723 ms       ｜<br>|MaterializedView  |2022-09-24 15:12:54|2022-09-24 15:12:54|finish  |0          |0            |0            |0            |0                   |138 ms       ｜<br>|Function          |2022-09-24 15:12:54|2022-09-24 15:12:54|finish  |0          |0            |0            |0            |0                   |113 ms       ｜<br>|Procedure         |2022-09-24 15:12:54|2022-09-24 15:12:55|finish  |0          |0            |0            |0            |0                   |109 ms       ｜<br>|Package           |2022-09-24 15:12:55|2022-09-24 15:12:55|finish  |0          |0            |0            |0            |0                   |77 ms        ｜<br>|Trigger           |2022-09-24 15:12:55|2022-09-24 15:12:55|finish  |0          |0            |0            |0            |0                   |404 ms       ｜<br>|Synonym           |2022-09-24 15:12:55|2022-09-24 15:12:55|finish  |0          |0            |0            |0            |0                   |74 ms        ｜<br>|TableDataCom      |2022-09-24 15:12:55|2022-09-24 15:12:56|finish  |7          |7            |0            |0            |0                   |810 ms       ｜<br>|AlterSequence     |2022-09-24 15:12:56|2022-09-24 15:12:56|finish  |0          |0            |0            |0            |0                   |71 ms        ｜<br>|CollStatistics    |2022-09-24 15:12:56|2022-09-24 15:12:56|finish  |7          |7            |0            |0            |0                   |29 ms        ｜<br>+------------------+-------------------+-------------------+--------+-----------+-------------+-------------+-------------+--------------------|-------------+</pre>



<p>We can see all the tables and table data are successfully migrated to MogDB without any error, but for constraint, there is 1 failed, and for view, there are 2 failed.</p>



<p>The failed constraint is a JSON check constraint. MogDB dosn&#8217;t has this type of constraint.</p>



<figure class="wp-block-image"><img decoding="async" src="https://s2.loli.net/2022/09/24/RDKmsNFvroWTPgZ.png" alt="image-20220924153609138"/></figure>



<p>The failed views are about grouping_id function and json_table function which MogDB not implemented yet.</p>



<figure class="wp-block-image"><img decoding="async" src="https://s2.loli.net/2022/09/24/4BMfnQ6alrqhvd8.png" alt="image-20220924154621375"/></figure>



<h2 class="wp-block-heading">Run the sample queries</h2>



<pre class="wp-block-preformatted">/* 5 products with the highest revenue<br>   With their corresponding order rank */<br>select p.product_name, <br>       count(*) number_of_orders,<br>       sum ( oi.quantity * oi.unit_price ) total_value,<br>       rank () over ( <br>         order by count(*) desc <br>       ) order_count_rank<br>from   products p<br>join   order_items oi<br>on     p.product_id = oi.product_id<br>group  by p.product_name<br>order  by sum ( oi.quantity * oi.unit_price ) desc<br>fetch  first 5 rows only;</pre>



<pre class="wp-block-preformatted">MogDB=&gt; select p.product_name,<br>MogDB-&gt;        count(*) number_of_orders,<br>MogDB-&gt;        sum ( oi.quantity * oi.unit_price ) total_value,<br>MogDB-&gt;        rank () over (<br>MogDB(&gt;          order by sum ( oi.quantity * oi.unit_price ) desc<br>MogDB(&gt;        ) revenue_rank<br>MogDB-&gt; from   products p<br>MogDB-&gt; join   order_items oi<br>MogDB-&gt; on     p.product_id = oi.product_id<br>MogDB-&gt; group  by p.product_name<br>MogDB-&gt; order  by count(*) desc<br>MogDB-&gt; fetch  first 5 rows only;<br>     product_name      | number_of_orders | total_value | revenue_rank<br>-----------------------+------------------+-------------+--------------<br> Girl's Trousers (Red) |              148 |    15794.76 |            1<br> Boy's Hoodie (Grey)   |              100 |     3754.08 |           35<br> Men's Pyjamas (Blue)  |              100 |     3274.61 |           36<br> Men's Coat (Red)      |               98 |     4230.30 |           31<br> Boy's Socks (White)   |               98 |     3081.12 |           38<br>(5 rows)</pre>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Migrating tables/table data/indexes from Oracle to MogDB normally has no issue, but for views/procedures/functions/packages, we still have to made some modification to the source code.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbform.com/2022/09/25/using-mtk-to-migrate-oracle-sample-schema-to-mogdb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4378</post-id>	</item>
		<item>
		<title>Flashback Query in MogDB 3.0</title>
		<link>https://www.dbform.com/2022/09/02/flashback-query-in-mogdb-3-0/</link>
					<comments>https://www.dbform.com/2022/09/02/flashback-query-in-mogdb-3-0/#respond</comments>
		
		<dc:creator><![CDATA[kamus]]></dc:creator>
		<pubDate>Fri, 02 Sep 2022 06:39:38 +0000</pubDate>
				<category><![CDATA[MogDB]]></category>
		<guid isPermaLink="false">https://www.dbform.com/?p=4372</guid>

					<description><![CDATA[闪回查询可以让使用者查询到以往某个时间点上的表中的内容，这对于某些场合是非常有用处的，甚至是救命的功能。比如如果不小心误删除了表中的数据，就可以通过闪回查询查到删除时间点之前的数据，这样可以直接将这些数据再恢复回来。 比如这样一个让人惋惜的场景（delete的SQL请千万不要在生产环境中运行）。 现在你有这么一张表，记录了账户姓名和账户金额。 MogDB=# select * from accounts; name &#124; amount------+-------- A &#160; &#124; &#160; 100 B &#160; &#124; &#160; 100 C &#160; &#124; &#160; 100 D &#160; &#124; &#160; &#160; 99(4 rows) 你本来想执行一条SQL，去删除金额等于99元的账户信息。正常执行的话，应该删除1条记录。为了演示效果，先用select来代替delete。 MogDB=# select * from accounts where amount=99; name &#124; amount------+-------- D &#160; &#124; &#160; &#160; 99(1 row) 但是在键盘上减号“-”和等号“=”紧挨着，你的手指太胖了，误按到了减号，所以现在你给数据库发出去的命令是这样的。 delete from accounts [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>闪回查询可以让使用者查询到以往某个时间点上的表中的内容，这对于某些场合是非常有用处的，甚至是救命的功能。比如如果不小心误删除了表中的数据，就可以通过闪回查询查到删除时间点之前的数据，这样可以直接将这些数据再恢复回来。</p>



<p>比如这样一个让人惋惜的场景（delete的SQL请千万不要在生产环境中运行）。</p>



<p>现在你有这么一张表，记录了账户姓名和账户金额。</p>



<pre class="wp-block-preformatted">MogDB=# select * from accounts;<br> name | amount<br>------+--------<br> A &nbsp;  | &nbsp;  100<br> B &nbsp;  | &nbsp;  100<br> C &nbsp;  | &nbsp;  100<br> D &nbsp;  | &nbsp; &nbsp; 99<br>(4 rows)</pre>



<p>你本来想执行一条SQL，去删除金额等于99元的账户信息。正常执行的话，应该删除1条记录。为了演示效果，先用select来代替delete。</p>



<pre class="wp-block-preformatted">MogDB=#  select * from accounts where amount=99;<br> name | amount<br>------+--------<br> D &nbsp;  | &nbsp; &nbsp; 99<br>(1 row)</pre>



<p>但是在键盘上减号“-”和等号“=”紧挨着，你的手指太胖了，误按到了减号，所以现在你给数据库发出去的命令是这样的。</p>



<pre class="wp-block-preformatted">delete from accounts where amount-99;</pre>



<p>为了演示，还是用select来代替delete。</p>



<pre class="wp-block-preformatted">#  select * from accounts where amount-99;<br> name | amount<br>------+--------<br> A &nbsp;  | &nbsp;  100<br> B &nbsp;  | &nbsp;  100<br> C &nbsp;  | &nbsp;  100<br>(3 rows)</pre>



<p>恐怖的事情发生了，除了金额真的等于99的那条数据没有返回，其它所有的数据都返回了。也就意味着，如果这是上面的那条delete命令，你删除了表中所有金额不等于99的账户。</p>



<p>好消息是，在MogDB 3.0中，已经修改了对减号这种危险语法的校验，现在执行同样的SQL，将会报错。</p>



<pre class="wp-block-preformatted">MogDB=# delete from accounts where amount-99;<br>ERROR:  argument of WHERE must be type boolean, not type integer<br>LINE 1: delete from accounts where amount-99;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^</pre>



<p>但是在社区版的openGauss3.0或者MySQL或者MariaDB中，这样的危险语法仍然是可以正常执行的。</p>



<pre class="wp-block-preformatted">gsql ((openGauss 3.0.0 build 02c14696) compiled at 2022-04-01 18:28:23 commit 0 last mr  release)<br>Non-SSL connection (SSL connection is recommended when requiring high-security)<br>Type "help" for help.<br>​<br>omm=# select version();<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  version<br>--------------------------------------------------------------------------------------------<br> (openGauss 3.0.0 build 02c14696) compiled at 2022-04-01 18:28:23 commit 0 last mr  release<br>(1 row)<br>​<br>omm=# create table accounts (name varchar2, amount int);<br>CREATE TABLE<br>omm=# insert into accounts values ('A',100),('B',100),('C',100),('D',99);<br>INSERT 0 4<br>omm=# delete from accounts where amount-99;<br>DELETE 3<br>omm=# select * from accounts;<br> name | amount<br>------+--------<br> D &nbsp;  | &nbsp; &nbsp; 99<br>(1 row)</pre>



<p>不管是什么误操作，如果真的发生了，那么在MogDB 3.0中还有闪回查询可以用。</p>



<p>闪回查询及相关实现在MogDB 3.0中发生了一些变化。</p>



<ol class="wp-block-list"><li>只对存储引擎为ustore的表起作用，默认的astore已经不再支持闪回查询。</li><li>需要先手工设置undo_retention_time。该参数表示回滚段中旧版本数据的保留时间，等同于允许闪回查询的时间跨度。该参数默认是0，任何闪回查询都会遇到<code>restore point not found</code>报错。</li></ol>



<p>创建一张ustore的accounts表。</p>



<pre class="wp-block-preformatted">MogDB=# create table accounts (name varchar2, amount int) with (storage_type=ustore);<br>CREATE TABLE</pre>



<p>修改undo_retention_time参数，该参数单位是秒，86400表示是24小时。该参数允许最大值2147483647，相当于大约68年。当然你不会设置这么大，因为这会导致回滚段中保留过多旧数据。</p>



<pre class="wp-block-preformatted">MogDB=# alter system set undo_retention_time=86400;<br>ALTER SYSTEM SET</pre>



<p>插入一些测试数据，就用前面提到的账户和金额。</p>



<pre class="wp-block-preformatted">MogDB=#  insert into accounts values ('A',100),('B',100),('C',100),('D',99);<br>INSERT 0 4</pre>



<p>现在，因为某种误操作，你删除了所有金额不等于99的账户记录。</p>



<pre class="wp-block-preformatted">MogDB=# delete from accounts where amount&lt;&gt;99;<br>DELETE 3<br>​<br>MogDB=#  select * from accounts;<br> name | amount<br>------+--------<br> D &nbsp;  | &nbsp; &nbsp; 99<br>(1 row)</pre>



<p>当你发现这个失误的时候，可能是在1分钟以后，也可能是在1小时以后，这没关系，但是不要超过24小时（因为undo_retention_time设置了24小时），否则就找不回来了。</p>



<p>检查当前的时间戳，然后预估你执行误操作时候的时间戳，比如用当前时间戳减去5分钟，为了简便演示，我在发出删除命令之前，检查了系统的时间戳。</p>



<pre class="wp-block-preformatted">MogDB=# select sysdate;<br> &nbsp; &nbsp; &nbsp; sysdate<br>---------------------<br> 2022-09-02 13:19:24<br>(1 row)</pre>



<p>发起闪回查询。</p>



<pre class="wp-block-preformatted">MogDB=# select * from accounts timecapsule TIMESTAMP to_timestamp('2022-09-02 13:19:24','YYYY-MM-DD HH24:MI:SS');<br> name | amount<br>------+--------<br> A &nbsp;  | &nbsp;  100<br> B &nbsp;  | &nbsp;  100<br> C &nbsp;  | &nbsp;  100<br> D &nbsp;  | &nbsp; &nbsp; 99<br>(4 rows)</pre>



<p>真正的恢复步骤，可以是按照删除命令的条件，利用闪回查询将所有被误删除的记录创建为一张临时表，然后再从临时表中将所有记录插入回原表中。</p>



<pre class="wp-block-preformatted">MogDB=# create table tmp_accounts as select * from accounts timecapsule TIMESTAMP to_timestamp('2022-09-02 13:19:24','YYYY-MM-DD HH24:MI:SS') where amount&lt;&gt;99;<br>INSERT 0 3<br>​<br>MogDB=# select * from tmp_accounts;<br> name | amount<br>------+--------<br> A &nbsp;  | &nbsp;  100<br> B &nbsp;  | &nbsp;  100<br> C &nbsp;  | &nbsp;  100<br>(3 rows)<br>​<br>MogDB=# insert into accounts select * from tmp_accounts;<br>INSERT 0 3<br>​<br>MogDB=# select * from accounts;<br> name | amount<br>------+--------<br> D &nbsp;  | &nbsp; &nbsp; 99<br> A &nbsp;  | &nbsp;  100<br> B &nbsp;  | &nbsp;  100<br> C &nbsp;  | &nbsp;  100<br>(4 rows)</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbform.com/2022/09/02/flashback-query-in-mogdb-3-0/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4372</post-id>	</item>
		<item>
		<title>Great Chinese Style Wallpaper Generator for Linux (Ubuntu and Pop!OS)</title>
		<link>https://www.dbform.com/2022/07/26/great-chinese-style-wallpaper-generator-for-linux-ubuntu-and-popos/</link>
					<comments>https://www.dbform.com/2022/07/26/great-chinese-style-wallpaper-generator-for-linux-ubuntu-and-popos/#respond</comments>
		
		<dc:creator><![CDATA[kamus]]></dc:creator>
		<pubDate>Tue, 26 Jul 2022 02:51:53 +0000</pubDate>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Pop!_OS]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Wallpaper]]></category>
		<guid isPermaLink="false">https://www.dbform.com/?p=4364</guid>

					<description><![CDATA[Have a look shuzhi shuzhi （数枝）是一个可以运行在Gnome里的Gnome Shell Extension，它的主页在这里。 安装shuzhi非常简单，如果你已经启用了Gnome Shell Extention，只需要在Firefox里访问shuzhi页面，点一下ON就可以了。 shuzhi可以根据设定，在指定的时间里自动刷新桌面壁纸，每一张桌面壁纸都是动态生成的，包含了根据国风配色的底色，还有从古诗词一言API上实时获取的一句中国古代诗词。通过可设定的底色图案以及文字的竖排横排样式，和文字字体，构成了美轮美奂的一张张国风壁纸。 Fonts 字体非常重要，我使用的是方正清刻本悦宋，这是一款可以免费下载的字体。方正字库中还有不少可以免费下载的国风字体，比如方正黄庭坚行书，方正赵孟頫楷书。]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Have a look</h2>



<figure class="wp-block-image"><img decoding="async" src="https://s2.loli.net/2022/07/26/OymNbZE3XTI7BFz.png" alt="shuzhi"/></figure>



<figure class="wp-block-image"><img decoding="async" src="https://s2.loli.net/2022/07/26/jfQYpeXatBH2Sim.png" alt="shuzhi-dark"/></figure>



<figure class="wp-block-image"><img decoding="async" src="https://s2.loli.net/2022/07/26/4RA9vPtMH25SLVw.jpg" alt="bg-3"/></figure>



<h2 class="wp-block-heading">shuzhi</h2>



<p><a href="https://extensions.gnome.org/extension/3985/shu-zhi/">shuzhi</a> （数枝）是一个可以运行在Gnome里的Gnome Shell Extension，它的主页在<a href="https://github.com/tuberry/shuzhi">这里</a>。</p>



<p>安装shuzhi非常简单，如果你已经启用了Gnome Shell Extention，只需要在Firefox里访问<a href="https://extensions.gnome.org/extension/3985/shu-zhi/">shuzhi</a>页面，点一下ON就可以了。</p>



<p>shuzhi可以根据设定，在指定的时间里自动刷新桌面壁纸，每一张桌面壁纸都是动态生成的，包含了根据国风配色的底色，还有从<a href="https://gushi.ci/">古诗词一言API</a>上实时获取的一句中国古代诗词。通过可设定的底色图案以及文字的竖排横排样式，和文字字体，构成了美轮美奂的一张张国风壁纸。</p>



<figure class="wp-block-image"><img decoding="async" src="https://s2.loli.net/2022/07/26/olLpdDQH65XW1vk.png" alt="image-20220726112508929"/></figure>



<h2 class="wp-block-heading">Fonts</h2>



<p>字体非常重要，我使用的是<a href="https://www.foundertype.com/index.php/FontInfo/index/id/199">方正清刻本悦宋</a>，这是一款可以免费下载的字体。方正字库中还有不少可以免费下载的国风字体，比如<a href="https://www.foundertype.com/index.php/FontInfo/index/id/5363">方正黄庭坚行书</a>，<a href="https://www.foundertype.com/index.php/FontInfo/index/id/5369">方正赵孟頫楷书</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbform.com/2022/07/26/great-chinese-style-wallpaper-generator-for-linux-ubuntu-and-popos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4364</post-id>	</item>
		<item>
		<title>Use PTK to install MogDB 3.0 on Oracle Enterprise Linux 8.6</title>
		<link>https://www.dbform.com/2022/07/05/use-ptk-to-install-mogdb-3-0-on-oracle-enterprise-linux-8-6/</link>
					<comments>https://www.dbform.com/2022/07/05/use-ptk-to-install-mogdb-3-0-on-oracle-enterprise-linux-8-6/#respond</comments>
		
		<dc:creator><![CDATA[kamus]]></dc:creator>
		<pubDate>Mon, 04 Jul 2022 17:00:53 +0000</pubDate>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[MogDB]]></category>
		<category><![CDATA[PTK]]></category>
		<guid isPermaLink="false">https://www.dbform.com/?p=4347</guid>

					<description><![CDATA[Which MogDB version and OS version was supported? [root@localhost ~]# ptk candidate mogdb-server &#160; software &#160; &#124; version &#160;---------------+---------- MogDB-Server &#124; 3.0.0 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#124; 2.1.1 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#124; 2.0.3 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#124; 2.0.1 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Which MogDB version and OS version was supported?</h2>



<pre class="wp-block-preformatted">[root@localhost ~]# ptk candidate mogdb-server<br> &nbsp;  software &nbsp; | version &nbsp;<br>---------------+----------<br>  MogDB-Server | 3.0.0 &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | 2.1.1 &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | 2.0.3 &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | 2.0.1 &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | 2.0.0 &nbsp; &nbsp;<br>[root@localhost ~]# ptk candidate os<br>  software | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>-----------+---------------------------------<br>  OS &nbsp; &nbsp; &nbsp; | UOS 20 (arm64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | UOS 20 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | CentOS 8 (arm64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | CentOS 7 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | CentOS 8 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | EulerOS 2 (arm64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | EulerOS 2 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Kylin V10 (arm64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Kylin V10 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Oracle Linux Server 7 (x86_64) &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Oracle Linux Server 8 (x86_64) &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | openEuler 20 (arm64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | openEuler 22 (arm64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | openEuler 20 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | openEuler 22 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | RedHat 7 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Rocky Linux 7 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Rocky Linux 8 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | SLES 12 (arm64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Ubuntu 18 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </pre>



<h2 class="wp-block-heading">Which OS version is using?</h2>



<pre class="wp-block-preformatted">[root@localhost ~]# cat /etc/os-release <br>NAME="Oracle Linux Server"<br>VERSION="8.6"<br>ID="ol"<br>ID_LIKE="fedora"<br>VARIANT="Server"<br>VARIANT_ID="server"<br>VERSION_ID="8.6"<br>PLATFORM_ID="platform:el8"<br>PRETTY_NAME="Oracle Linux Server 8.6"<br>ANSI_COLOR="0;31"<br>CPE_NAME="cpe:/o:oracle:linux:8:6:server"<br>HOME_URL="https://linux.oracle.com/"<br>BUG_REPORT_URL="https://bugzilla.oracle.com/"<br>​<br>ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"<br>ORACLE_BUGZILLA_PRODUCT_VERSION=8.6<br>ORACLE_SUPPORT_PRODUCT="Oracle Linux"<br>ORACLE_SUPPORT_PRODUCT_VERSION=8.6</pre>



<h2 class="wp-block-heading">Install PTK</h2>



<pre class="wp-block-preformatted">[root@localhost ~]# curl --proto '=https' --tlsv1.2 -sSf https://cdn-mogdb.enmotech.com/ptk/install.sh | sh<br>info: downloading ptk package<br>Detected shell: bash<br>Shell profile:  /root/.bash_profile<br>ptk has been added to PATH in /root/.bash_profile<br>open a new terminal or source /root/.bash_profile to active it<br>Installed path: /root/.ptk/bin/ptk<br>[root@localhost ~]# source /root/.bash_profile</pre>



<h2 class="wp-block-heading">Check OS</h2>



<p>Make sure has no &#8220;Abnormal&#8221; items, all the &#8220;WARNING&#8221; items can be ignored in testing environment.</p>



<p>Check.</p>



<pre class="wp-block-preformatted">[root@localhost ~]# ptk checkos<br>INFO[2022-07-04T06:51:04.120] local ip: 192.168.122.21 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>[host 192.168.122.21]: not found package: numactl<br>Please installed the above missing packages first before do other operations<br>[PTK-4010] the system does not meet installation requirements</pre>



<p>Install numactl.</p>



<pre class="wp-block-preformatted">[root@localhost ~]# dnf install numactl<br>Oracle Linux 8 BaseOS Latest (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  22 MB/s |  47 MB &nbsp; &nbsp; 00:02 &nbsp; &nbsp;<br>Oracle Linux 8 Application Stream (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 24 MB/s |  37 MB &nbsp; &nbsp; 00:01 &nbsp; &nbsp;<br>Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 20 MB/s |  50 MB &nbsp; &nbsp; 00:02 &nbsp; &nbsp;<br>Last metadata expiration check: 0:00:09 ago on Mon 04 Jul 2022 06:52:47 AM EDT.<br>Dependencies resolved.<br>================================================================================================================================================================<br> Package &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Architecture &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Repository &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Size<br>================================================================================================================================================================<br>Installing:<br> numactl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x86_64 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2.0.12-13.el8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ol8_baseos_latest &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  76 k<br>​<br>Transaction Summary<br>================================================================================================================================================================<br>Install  1 Package<br>​<br>Total download size: 76 k<br>Installed size: 161 k<br>Is this ok [y/N]: y<br>Downloading Packages:<br>numactl-2.0.12-13.el8.x86_64.rpm &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  637 kB/s |  76 kB &nbsp; &nbsp; 00:00 &nbsp; &nbsp;<br>----------------------------------------------------------------------------------------------------------------------------------------------------------------<br>Total &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 624 kB/s |  76 kB &nbsp; &nbsp; 00:00 &nbsp; &nbsp; <br>Oracle Linux 8 BaseOS Latest (x86_64) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3.0 MB/s | 3.1 kB &nbsp; &nbsp; 00:00 &nbsp; &nbsp;<br>Importing GPG key 0xAD986DA3:<br> Userid &nbsp; &nbsp; : "Oracle OSS group (Open Source Software group) &lt;build@oss.oracle.com&gt;"<br> Fingerprint: 76FD 3DB1 3AB6 7410 B89D B10E 8256 2EA9 AD98 6DA3<br> From &nbsp; &nbsp; &nbsp; : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle<br>Is this ok [y/N]: y<br>Key imported successfully<br>Running transaction check<br>Transaction check succeeded.<br>Running transaction test<br>Transaction test succeeded.<br>Running transaction<br>  Preparing &nbsp; &nbsp; &nbsp;  : &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  1/1 <br>  Installing &nbsp; &nbsp; &nbsp; : numactl-2.0.12-13.el8.x86_64 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1/1 <br>  Running scriptlet: numactl-2.0.12-13.el8.x86_64 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1/1 <br>  Verifying &nbsp; &nbsp; &nbsp;  : numactl-2.0.12-13.el8.x86_64 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1/1 <br>​<br>Installed:<br>  numactl-2.0.12-13.el8.x86_64 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>​<br>Complete!</pre>



<p>Check again.</p>



<pre class="wp-block-preformatted">[root@localhost ~]# ptk checkos<br>INFO[2022-07-04T06:53:27.021] local ip: 192.168.122.21 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>INFO[2022-07-04T06:53:36.264] platform: ol_8.6_64bit &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T06:53:36.268] kernel version: 5.4.17-2136.307.3.1.el8uek.x86_64  host=192.168.122.21<br>INFO[2022-07-04T06:53:36.359] locale: LANG=en_US.UTF-8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T06:53:36.364] timezone: -0400 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T06:53:36.368] swap memory 2154492kB, total memory 1734880kB  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.382] net.ipv4.tcp_tw_reuse=2, expect 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:53:36.389] net.ipv4.tcp_retries1=3, expect 5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:53:36.394] net.ipv4.tcp_max_syn_backlog=128, expect 65535  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.398] net.ipv4.tcp_syn_retries=6, expect 5 &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.402] net.core.wmem_max=212992, expect 21299200 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:53:36.406] net.core.wmem_default=212992, expect 21299200  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.410] net.ipv4.tcp_max_tw_buckets=8192, expect 10000  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.414] net.core.rmem_default=212992, expect 21299200  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.418] kernel.sem=32000  1024000000  500 32000, expect 250 6400000 1000 25600  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.435] net.core.netdev_max_backlog=1000, expect 65535  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.438] net.core.rmem_max=212992, expect 21299200 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:53:36.448] vm.min_free_kbytes=45056, expect 86744 &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.457] net.ipv4.tcp_keepalive_intvl=75, expect 30 &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.461] net.ipv4.tcp_rmem=4096    131072  6291456, expect 8192 250000 16777216  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.473] net.core.somaxconn=4096, expect 65535 &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:53:36.478] net.ipv4.tcp_keepalive_time=7200, expect 30 &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:53:36.481] net.ipv4.tcp_retries2=15, expect 12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:53:36.490] net.ipv4.tcp_wmem=4096    16384   4194304, expect 8192 250000 16777216  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.637] device(/dev/vda) readahead value=8192, expect 16384.  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.661] device(sr0) 'IO Request'=64, expect 512 &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:53:36.661] device(vda) 'IO Request'=256, expect 512 &nbsp; &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.661] device(dm-0) 'IO Request'=128, expect 512 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:53:36.661] device(dm-1) 'IO Request'=128, expect 512 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:53:36.669] device(vda) 'IO scheduler'='none', expect 'mq-deadline'  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.681] not found network conf file for enp1s0 in dir /etc/sysconfig/network, skip check bonding  host=192.168.122.21<br>WARN[2022-07-04T06:53:36.710] network card(enp1s0): mtu=1500, expect 8192 &nbsp; host=192.168.122.21<br>ERRO[2022-07-04T06:53:36.721] transparent_hugepage status is 'always', expect 'never'  host=192.168.122.21<br>INFO[2022-07-04T06:53:45.839] write fix os script to root_fix_os.sh successfully <br>INFO[2022-07-04T06:53:45.839] all checkers finished &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br># Check Results<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Item &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  |  Level &nbsp; &nbsp;<br>------------------------------------+-----------<br>  A1.Check_OS_Version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; &nbsp;<br>  A2.Check_Kernel_Version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; &nbsp;<br>  A3.Check_Unicode &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | OK &nbsp; &nbsp; &nbsp; &nbsp;<br>  A4.Check_TimeZone &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; &nbsp;<br>  A5.Check_Swap_Memory_Configure &nbsp;  | Warning &nbsp; <br>  A6.Check_SysCtl_Parameter &nbsp; &nbsp; &nbsp; &nbsp; | Warning &nbsp; <br>  A7.Check_FileSystem_Configure &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; &nbsp;<br>  A8.Check_Disk_Configure &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; &nbsp;<br>  A9.Check_BlockDev_Configure &nbsp; &nbsp; &nbsp; | Warning &nbsp; <br>  A9.Check_Logical_Block &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | OK &nbsp; &nbsp; &nbsp; &nbsp;<br>  A10.Check_IO_Configure &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | Warning &nbsp; <br>  A10.Check_IO_Request &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | Warning &nbsp; <br>  A10.Check_Asynchronous_IO_Request | OK &nbsp; &nbsp; &nbsp; &nbsp;<br>  A11.Check_Network_Configure &nbsp; &nbsp; &nbsp; | Warning &nbsp; <br>  A12.Check_Time_Consistency &nbsp; &nbsp; &nbsp;  | OK &nbsp; &nbsp; &nbsp; &nbsp;<br>  A13.Check_Firewall_Service &nbsp; &nbsp; &nbsp;  | OK &nbsp; &nbsp; &nbsp; &nbsp;<br>  A14.Check_THP_Service &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Abnormal &nbsp;<br>  A15.Check_Dependent_Package &nbsp; &nbsp; &nbsp; | Warning &nbsp; <br>  A16.Check_CPU_Instruction_Set &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; &nbsp;<br>Total count 19, abnormal count 1, warning count 7<br>​<br>Failed to check os, can’t perform installation unless fix all the abnormal items<br>You can use 'ptk checkos -i ITEM --detail' to see detail message<br>Please check root_fix_os.sh for commands to resolve.</pre>



<p>Disable TPH. the command can be find in root_fix_os.sh generated by PTK.</p>



<pre class="wp-block-preformatted">[root@localhost ~]# [ -f /sys/kernel/mm/transparent_hugepage/enabled ] &amp;&amp; echo 'never' | sudo tee /sys/kernel/mm/transparent_hugepage/enabled<br>never</pre>



<p>Check again.</p>



<pre class="wp-block-preformatted">[root@localhost ~]# ptk checkos<br>INFO[2022-07-04T06:57:55.973] local ip: 192.168.122.21 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>INFO[2022-07-04T06:58:05.230] platform: ol_8.6_64bit &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T06:58:05.234] kernel version: 5.4.17-2136.307.3.1.el8uek.x86_64  host=192.168.122.21<br>INFO[2022-07-04T06:58:05.324] locale: LANG=en_US.UTF-8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T06:58:05.329] timezone: -0400 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T06:58:05.333] swap memory 2154492kB, total memory 1734880kB  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.338] net.core.wmem_max=212992, expect 21299200 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:58:05.342] net.ipv4.tcp_max_tw_buckets=8192, expect 10000  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.355] net.core.netdev_max_backlog=1000, expect 65535  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.359] net.ipv4.tcp_retries1=3, expect 5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:58:05.362] net.ipv4.tcp_wmem=4096    16384   4194304, expect 8192 250000 16777216  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.366] net.core.wmem_default=212992, expect 21299200  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.378] kernel.sem=32000  1024000000  500 32000, expect 250 6400000 1000 25600  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.382] net.ipv4.tcp_max_syn_backlog=128, expect 65535  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.392] net.core.somaxconn=4096, expect 65535 &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:58:05.396] net.core.rmem_max=212992, expect 21299200 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:58:05.399] net.core.rmem_default=212992, expect 21299200  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.408] net.ipv4.tcp_tw_reuse=2, expect 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:58:05.412] net.ipv4.tcp_keepalive_time=7200, expect 30 &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:58:05.416] net.ipv4.tcp_rmem=4096    131072  6291456, expect 8192 250000 16777216  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.420] net.ipv4.tcp_syn_retries=6, expect 5 &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.432] net.ipv4.tcp_keepalive_intvl=75, expect 30 &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.437] net.ipv4.tcp_retries2=15, expect 12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:58:05.452] vm.min_free_kbytes=45056, expect 86744 &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.586] device(/dev/vda) readahead value=8192, expect 16384.  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.609] device(dm-0) 'IO Request'=128, expect 512 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:58:05.609] device(dm-1) 'IO Request'=128, expect 512 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:58:05.609] device(sr0) 'IO Request'=64, expect 512 &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T06:58:05.609] device(vda) 'IO Request'=256, expect 512 &nbsp; &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.616] device(vda) 'IO scheduler'='none', expect 'mq-deadline'  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.627] not found network conf file for enp1s0 in dir /etc/sysconfig/network, skip check bonding  host=192.168.122.21<br>WARN[2022-07-04T06:58:05.653] network card(enp1s0): mtu=1500, expect 8192 &nbsp; host=192.168.122.21<br>INFO[2022-07-04T06:58:14.838] write fix os script to root_fix_os.sh successfully <br>INFO[2022-07-04T06:58:14.839] all checkers finished &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br># Check Results<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Item &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  |  Level &nbsp; <br>------------------------------------+----------<br>  A1.Check_OS_Version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; <br>  A2.Check_Kernel_Version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; <br>  A3.Check_Unicode &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | OK &nbsp; &nbsp; &nbsp; <br>  A4.Check_TimeZone &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; <br>  A5.Check_Swap_Memory_Configure &nbsp;  | Warning &nbsp;<br>  A6.Check_SysCtl_Parameter &nbsp; &nbsp; &nbsp; &nbsp; | Warning &nbsp;<br>  A7.Check_FileSystem_Configure &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; <br>  A8.Check_Disk_Configure &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; <br>  A9.Check_BlockDev_Configure &nbsp; &nbsp; &nbsp; | Warning &nbsp;<br>  A9.Check_Logical_Block &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | OK &nbsp; &nbsp; &nbsp; <br>  A10.Check_Asynchronous_IO_Request | OK &nbsp; &nbsp; &nbsp; <br>  A10.Check_IO_Configure &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | Warning &nbsp;<br>  A10.Check_IO_Request &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | Warning &nbsp;<br>  A11.Check_Network_Configure &nbsp; &nbsp; &nbsp; | Warning &nbsp;<br>  A12.Check_Time_Consistency &nbsp; &nbsp; &nbsp;  | OK &nbsp; &nbsp; &nbsp; <br>  A13.Check_Firewall_Service &nbsp; &nbsp; &nbsp;  | OK &nbsp; &nbsp; &nbsp; <br>  A14.Check_THP_Service &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; <br>  A15.Check_Dependent_Package &nbsp; &nbsp; &nbsp; | Warning &nbsp;<br>  A16.Check_CPU_Instruction_Set &nbsp; &nbsp; | OK &nbsp; &nbsp; &nbsp; <br>Total count 19, abnormal count 0, warning count 7</pre>



<h2 class="wp-block-heading">Generate config file</h2>



<p>If this is the newly installation in a new OS, no need to modify anything, just keep all the default settings.</p>



<pre class="wp-block-preformatted">[root@localhost ~]# ptk template --local &gt; config.yaml<br>[root@localhost ~]# cat config.yaml <br>global:<br>  # # cluster name (required)<br>  cluster_name: "cluster_xWsybr"<br>  # # system user for running db<br>  user: "omm"<br>  # # system user group, same as username if not given<br>  group: "omm"<br>  # # base directory for install MogDB server,<br>  # # if any of app_dir，data_dir，log_dir and tool_dir not config，<br>  # # PTK will create corresponding directory under base_dir<br>  base_dir: "/opt/mogdb"<br>​<br>db_servers:<br>  - host: "127.0.0.1"<br> &nbsp;  # # database port<br> &nbsp;  db_port: 26000</pre>



<h2 class="wp-block-heading">Install MogDB 3.0</h2>



<p>PTK will download MogDB for openEuler image in all the Fedora like OS from version 8. Please make sure you are using the latest ptk by using <code>ptk self upgrade</code>. PTK is being developed very actively, Upgrading PTK every few days is recommend.</p>



<pre class="wp-block-preformatted">[root@localhost ~]# ptk self upgrade<br>INFO[2022-07-04T08:29:16.082] start download ptk_linux_x86_64.tar.gz &nbsp; &nbsp; &nbsp; <br>&gt; download ptk_linux_x86_64.t...: 3.93 MiB / 3.93 MiB [------------------------------------------------------------------------------] 100.00% 3.83 MiB p/s 1.2s<br>INFO[2022-07-04T08:29:22.006] download ptk_linux_x86_64.tar.gz successfully <br>INFO[2022-07-04T08:29:22.122] upgrade ptk successfully &nbsp; <br>​<br>[root@localhost ~]# ptk -v<br>PTK Version: v0.2.2<br>Go Version: go1.17.1<br>Build Date: 2022-07-04T12:18:21Z<br>Git Hash: 5959dd0</pre>



<pre class="wp-block-preformatted">[root@localhost ~]# ptk install -f config.yaml<br>Please enter db password (8~16 characters): <br>Retype db password: <br>=============================<br>global:<br>  cluster_name: cluster_xWsybr<br>  user: omm<br>  group: omm<br>  app_dir: /opt/mogdb/app<br>  data_dir: /opt/mogdb/data<br>  log_dir: /opt/mogdb/log<br>  tool_dir: /opt/mogdb/tool<br>  tmp_dir: /opt/mogdb/tmp<br>db_servers:<br>- host: 192.168.122.21<br>  db_port: 26000<br>  role: primary<br>  az_name: AZ1<br>  az_priority: 1<br>​<br>=============================<br>Is cluster topo correct?[Y|Yes](default=N) Y<br>INFO[2022-07-04T08:32:54.640] no package specified, use online package: https://cdn-mogdb.enmotech.com/mogdb-media/3.0.0/MogDB-3.0.0-openEuler-x86_64.tar.gz <br>INFO[2022-07-04T08:32:54.641] downloading package... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>&gt; download MogDB-3.0.0-openEu...: 134.20 MiB / 134.20 MiB [---------------------------------------------------------------------------] 100.00% 9.02 MiB p/s 15s<br>INFO[2022-07-04T08:33:13.597] download package successfully &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>WARN[2022-07-04T08:33:14.463] vendor does not provide sha256 file for MogDB-3.0.0-openEuler-64bit-Libpq, skip validate <br>WARN[2022-07-04T08:33:14.529] vendor does not provide sha256 file for MogDB-3.0.0-openEuler-64bit-tools, skip validate <br>INFO[2022-07-04T08:33:14.871] the installation package files are safe &nbsp; &nbsp; &nbsp;<br>INFO[2022-07-04T08:33:14.871] parse version.cfg from MogDB-3.0.0-openEuler-64bit.tar.gz <br>INFO[2022-07-04T08:33:17.386] detected db version: MogDB-3.0.0, number: 92.605, commit_id: 62408a0f <br>WARN[2022-07-04T08:33:17.394] the number of instances is less than 3, CM will not be installed <br>INFO[2022-07-04T08:33:17.394] start check operating system &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>INFO[2022-07-04T08:33:17.394] local ip: 192.168.122.21 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>INFO[2022-07-04T08:33:26.605] platform: ol_8.6_64bit &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:26.610] kernel version: 5.4.17-2136.307.3.1.el8uek.x86_64  host=192.168.122.21<br>INFO[2022-07-04T08:33:26.702] locale: LANG=en_US.UTF-8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:26.708] timezone: -0400 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:26.714] swap memory 2154492kB, total memory 1734880kB  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.724] net.ipv4.tcp_syn_retries=6, expect 5 &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.735] net.ipv4.tcp_rmem=4096    131072  6291456, expect 8192 250000 16777216  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.744] net.ipv4.tcp_max_syn_backlog=128, expect 65535  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.754] net.core.rmem_max=212992, expect 21299200 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T08:33:26.759] net.core.wmem_default=212992, expect 21299200  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.764] net.core.rmem_default=212992, expect 21299200  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.776] vm.min_free_kbytes=45056, expect 86744 &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.790] net.ipv4.tcp_keepalive_intvl=75, expect 30 &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.800] net.ipv4.tcp_retries2=15, expect 12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T08:33:26.804] net.core.wmem_max=212992, expect 21299200 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T08:33:26.809] net.ipv4.tcp_keepalive_time=7200, expect 30 &nbsp; host=192.168.122.21<br>WARN[2022-07-04T08:33:26.813] net.ipv4.tcp_retries1=3, expect 5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T08:33:26.818] net.ipv4.tcp_wmem=4096    16384   4194304, expect 8192 250000 16777216  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.823] net.core.somaxconn=4096, expect 65535 &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T08:33:26.832] net.ipv4.tcp_max_tw_buckets=8192, expect 10000  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.844] net.core.netdev_max_backlog=1000, expect 65535  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.848] kernel.sem=32000  1024000000  500 32000, expect 250 6400000 1000 25600  host=192.168.122.21<br>WARN[2022-07-04T08:33:26.857] net.ipv4.tcp_tw_reuse=2, expect 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T08:33:26.993] device(/dev/vda) readahead value=8192, expect 16384.  host=192.168.122.21<br>WARN[2022-07-04T08:33:27.018] device(vda) 'IO Request'=256, expect 512 &nbsp; &nbsp;  host=192.168.122.21<br>WARN[2022-07-04T08:33:27.018] device(dm-0) 'IO Request'=128, expect 512 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T08:33:27.018] device(dm-1) 'IO Request'=128, expect 512 &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T08:33:27.018] device(sr0) 'IO Request'=64, expect 512 &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>WARN[2022-07-04T08:33:27.026] device(vda) 'IO scheduler'='none', expect 'mq-deadline'  host=192.168.122.21<br>WARN[2022-07-04T08:33:27.082] network card(enp1s0): mtu=1500, expect 8192 &nbsp; host=192.168.122.21<br>WARN[2022-07-04T08:33:27.102] the firewall service status='enabled', expect 'disabled'.  host=192.168.122.21<br>INFO[2022-07-04T08:33:36.128] [stage=precheck]: start &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:36.128] check core pattern value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:36.136] check RemoveIPC value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:36.142] check user 'omm' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:36.151] check port 26000 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:36.211] port 26000 is free &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:36.212] [stage=precheck]: successful &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:36.212] scp file from /root/.ptk/cache/MogDB-3.0.0-openEuler-x86_64.tar.gz to 192.168.122.21:/tmp/MogDB-3.0.0-openEuler-x86_64.tar.gz  host=192.168.122.21<br>INFO[2022-07-04T08:33:36.316] [stage=initial]: start &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:36.323] total memory(1GB) is less then 4GB, use default guc config  host=192.168.122.21<br>INFO[2022-07-04T08:33:36.323] create os user omm, group omm &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:37.440] set ulimits &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:37.444] set user omm profiles &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:37.611] add c library /usr/local/lib to /etc/ld.so.conf.d/libc.conf  host=192.168.122.21<br>INFO[2022-07-04T08:33:37.616] mkdir /opt/mogdb/tool &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:37.774] decompress MogDB-3.0.0-openEuler-x86_64.tar.gz to dir /opt/mogdb/tool  host=192.168.122.21<br>INFO[2022-07-04T08:33:38.809] remove files /tmp/MogDB-3.0.0-openEuler-x86_64.tar.gz  host=192.168.122.21<br>INFO[2022-07-04T08:33:38.826] decompress *-om.tar.gz to dir /opt/mogdb/tool  host=192.168.122.21<br>INFO[2022-07-04T08:33:39.228] change /opt/mogdb/tool owner to omm &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:39.239] mkdir /opt/mogdb/app &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:39.384] decompress MogDB-3.0.0-openEuler-64bit.tar.gz to dir /opt/mogdb/app  host=192.168.122.21<br>INFO[2022-07-04T08:33:42.089] change /opt/mogdb/app owner to omm &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:42.101] mkdir /opt/mogdb/log/gs_profile,/opt/mogdb/log/pg_log,/opt/mogdb/log/pg_audit,/opt/mogdb/log/bin,/opt/mogdb/log/pg_log/dn_6001,/opt/mogdb/log/pg_audit/dn_6001  host=192.168.122.21<br>INFO[2022-07-04T08:33:43.382] mkdir /opt/mogdb/tmp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:43.523] save version to /opt/mogdb/app/bin/upgrade_version  host=192.168.122.21<br>INFO[2022-07-04T08:33:43.595] create cluster_manual_start file &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:43.660] generate static config to /opt/mogdb/app/bin/cluster_static_config  host=192.168.122.21<br>INFO[2022-07-04T08:33:43.668] change /opt/mogdb/app/bin/cluster_static_config owner to omm  host=192.168.122.21<br>INFO[2022-07-04T08:33:43.672] mkdir /opt/mogdb/data &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:43.812] change /opt/mogdb/data owner to omm &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:43.816] initial database &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:59.488] set 192.168.122.21 postgresql.conf &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br>INFO[2022-07-04T08:33:59.603] set 192.168.122.21 hba config &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:59.684] [stage=initial]: successful &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:59.684] [stage=launch]: start &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:33:59.684] start 192.168.122.21 database by gs_ctl &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:34:00.805] alter initial user password &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; host=192.168.122.21<br>INFO[2022-07-04T08:34:00.981] [stage=launch]: successful &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  host=192.168.122.21<br> &nbsp; &nbsp; &nbsp; host &nbsp; &nbsp;  | stage  | &nbsp;  status &nbsp; &nbsp; | message &nbsp;<br>-----------------+--------+---------------+----------<br>  192.168.122.21 | launch | start_success | success &nbsp;<br>[root@localhost ~]# ptk ls<br> &nbsp; cluster_name  | &nbsp; &nbsp;  instances &nbsp; &nbsp; &nbsp; | user | &nbsp;  data_dir &nbsp; &nbsp; | db_version &nbsp; <br>-----------------+----------------------+------+-----------------+--------------<br>  cluster_xWsybr | 192.168.122.21:26000 | omm  | /opt/mogdb/data | MogDB-3.0.0 &nbsp;<br>[root@localhost ~]# ptk cluster status -n cluster_xWsybr<br>​<br>[ &nbsp; Cluster State &nbsp; ]<br>​<br>database_version            : MogDB-3.0.0<br>cluster_name                : cluster_xWsybr<br>cluster_state &nbsp;             : Normal<br>current_az &nbsp; &nbsp;              : AZ_ALL<br>​<br>[  Datanode State &nbsp; ]<br>​<br> &nbsp; id  | &nbsp; &nbsp; &nbsp; ip &nbsp; &nbsp; &nbsp; | port  | user | instance | db_role | state &nbsp; <br>-------+----------------+-------+------+----------+---------+---------<br>  6001 | 192.168.122.21 | 26000 | omm  | dn_6001  | Normal  | Normal &nbsp;</pre>



<h2 class="wp-block-heading">Install and use mogila sample database</h2>



<p>It maybe takes more than 1 minute to complete the entire data manipulation works depending on the system configuration.</p>



<pre class="wp-block-preformatted">[root@localhost ~]# su - omm<br>[omm@localhost ~]$ git clone https://gitee.com/enmotech/mogila.git<br>Cloning into 'mogila'...<br>remote: Enumerating objects: 145, done.<br>remote: Counting objects: 100% (3/3), done.<br>remote: Compressing objects: 100% (3/3), done.<br>remote: Total 145 (delta 0), reused 0 (delta 0), pack-reused 142<br>Receiving objects: 100% (145/145), 4.25 MiB | 1.88 MiB/s, done.<br>Resolving deltas: 100% (73/73), done.<br>[omm@localhost ~]$ cd mogila/<br>[omm@localhost mogila]$ gsql -d postgres -p 26000 -c "create database mogila DBCOMPATIBILITY='PG'"<br>CREATE DATABASE<br>[omm@localhost mogila]$ gsql -d postgres -p 26000 -c "create user mogdb password 'Enmo@123'"<br>CREATE ROLE<br>[omm@localhost mogila]$ gsql -d postgres -p 26000 -c "alter user mogdb with sysadmin"<br>ALTER ROLE<br>[omm@localhost mogila]$ gsql -d mogila -p 26000 -f mogila-insert-data.sql<br>total time: 89570  ms<br>[omm@localhost mogila]$ <br>[omm@localhost mogila]$ gsql -d mogila -p 26000 -U mogdb -W Enmo@123 -r<br>gsql ((MogDB 3.0.0 build 62408a0f) compiled at 2022-06-30 14:21:32 commit 0 last mr  )<br>Non-SSL connection (SSL connection is recommended when requiring high-security)<br>Type "help" for help.<br>​<br>mogila=&gt; select version();<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>--------------------------------------------------------------------------------------------------------------------------------------------------<br> (MogDB 3.0.0 build 62408a0f) compiled at 2022-06-30 14:21:32 commit 0 last mr &nbsp; on x86_64-unknown-linux-gnu, compiled by g++ (GCC) 7.3.0, 64-bit<br>(1 row)</pre>



<h2 class="wp-block-heading">Install compat-tools to get more Oracle database compatibilities</h2>



<pre class="wp-block-preformatted">[omm@localhost ~]$ cd<br>[omm@localhost ~]$ git clone https://gitee.com/enmotech/compat-tools.git<br>Cloning into 'compat-tools'...<br>remote: Enumerating objects: 1100, done.<br>remote: Counting objects: 100% (208/208), done.<br>remote: Compressing objects: 100% (190/190), done.<br>remote: Total 1100 (delta 138), reused 35 (delta 18), pack-reused 892<br>Receiving objects: 100% (1100/1100), 1.45 MiB | 1.95 MiB/s, done.<br>Resolving deltas: 100% (698/698), done.<br>​<br>[omm@localhost ~]$ cd compat-tools/<br>[omm@localhost compat-tools]$ gsql -d mogila -p 26000 -f runMe.sql <br>gsql:runMe.sql:152: NOTICE: &nbsp;<br>gsql:runMe.sql:152: NOTICE:  -- =====================================================================<br>gsql:runMe.sql:152: NOTICE:  -- Test Summary: <br>gsql:runMe.sql:152: NOTICE:  -- =====================================================================<br>gsql:runMe.sql:152: NOTICE: &nbsp; &nbsp; | result_type | case_count | start_time &nbsp; &nbsp; &nbsp; &nbsp;  | complete_time &nbsp; &nbsp; &nbsp; |<br>gsql:runMe.sql:152: NOTICE: &nbsp; &nbsp; |-------------|------------|---------------------|---------------------|<br>gsql:runMe.sql:152: NOTICE: &nbsp; &nbsp; | PASSED &nbsp; &nbsp;  | &nbsp; &nbsp; &nbsp;  521 | 2022-07-04 13:10:49 | 2022-07-04 13:10:52 |<br>gsql:runMe.sql:152: NOTICE: &nbsp;<br>gsql:runMe.sql:152: NOTICE:  -- =====================================================================<br>gsql:runMe.sql:152: NOTICE:  -- Test Detail (Failed or Null): <br>gsql:runMe.sql:152: NOTICE:  -- =====================================================================<br>gsql:runMe.sql:152: NOTICE:  -- &lt;&lt;&lt; ALL SUCCEED &gt;&gt;&gt;<br>ANONYMOUS BLOCK EXECUTE<br>total time: 4461  ms<br>​<br>[omm@localhost compat-tools]$ gsql -d mogila -p 26000 -U mogdb -W Enmo@123 -r<br>gsql ((MogDB 3.0.0 build 62408a0f) compiled at 2022-06-30 14:21:32 commit 0 last mr  )<br>Non-SSL connection (SSL connection is recommended when requiring high-security)<br>Type "help" for help.<br>​<br>mogila=&gt; select * from v$version;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; banner &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>-------------------------------------------------<br> MogDB 3.0.0 build 62408a0f<br> compiled at 2022-06-30 14:21:32 <br> Platform architecture: x86_64-unknown-linux-gnu<br>(3 rows)<br>​<br>mogila=&gt; select table_name,num_rows,partitioned from user_tables;<br>  table_name &nbsp; | num_rows | partitioned <br>---------------+----------+-------------<br> ACTOR &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;  200 | NO<br> CATEGORY &nbsp; &nbsp;  | &nbsp; &nbsp; &nbsp; 16 | NO<br> CUSTOMER &nbsp; &nbsp;  | &nbsp; &nbsp;  599 | NO<br> CITY &nbsp; &nbsp; &nbsp; &nbsp;  | &nbsp; &nbsp;  600 | NO<br> COUNTRY &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;  109 | NO<br> LANGUAGE &nbsp; &nbsp;  | &nbsp; &nbsp; &nbsp;  6 | NO<br> FILM_ACTOR &nbsp;  | &nbsp; &nbsp; 5462 | NO<br> FILM_CATEGORY | &nbsp; &nbsp; 1000 | NO<br> FILM &nbsp; &nbsp; &nbsp; &nbsp;  | &nbsp; &nbsp; 1000 | NO<br> PAYMENT &nbsp; &nbsp; &nbsp; | &nbsp;  16049 | YES<br> INVENTORY &nbsp; &nbsp; | &nbsp; &nbsp; 4581 | NO<br> RENTAL &nbsp; &nbsp; &nbsp;  | &nbsp;  16044 | NO<br> STAFF &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp;  2 | NO<br> ADDRESS &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;  603 | NO<br> STORE &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp;  2 | NO<br>(15 rows)<br>​<br>mogila=&gt; select dbms_random.value(100,1000) from dual;<br> &nbsp; &nbsp;  value &nbsp; &nbsp; &nbsp; <br>------------------<br> 891.160552715883<br>(1 row)<br>​<br>mogila-&gt; \q<br>[omm@localhost compat-tools]$ <br>​</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbform.com/2022/07/05/use-ptk-to-install-mogdb-3-0-on-oracle-enterprise-linux-8-6/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4347</post-id>	</item>
	</channel>
</rss>
