{"slug":"oci","title":"Oracle（甲骨文云）踩坑记录","description":"在钞能力的帮助下也是成功薅到了一个甲骨文账号，上手把玩发现坑点挺多的，遂记录","coverImage":"https://b.acofork.com/img/oci-historical-cover.webp","coverWidth":493,"coverHeight":456,"date":"2025-09-07","tags":["服务器"],"pinned":false,"wordCount":2218,"html":"<h2 id=\"老天保佑我不要abc\">老天保佑我不要ABC</h2><p>首先是IP，<strong>不要开任何魔法！</strong> 直连即可，你在哪就用哪里的网络 </p>\n<p>其次是地址填写，建议两个地址都写，一行写中文，一行写英文（翻译即可）</p>\n<p>然后是付款，最简单就是拿你自己的卡进行注册</p>\n<p>直接去你家旁边的银行开一个 <strong>外币卡</strong> ，如 <strong>Visa</strong> <strong>万事达</strong> 即可</p>\n<p>然后换汇为 <strong>新加坡元</strong> ，甲骨文虽然仅扣款 <strong>1.38 新加坡元</strong> ，但建议存10个以上，因为有些行对于低余额可能会拒付，并且甲骨文后续也会尝试小额扣款验证卡的真实性</p>\n<aside class=\"markdown-alert markdown-alert--caution\"><div class=\"markdown-alert-title\"><svg class=\"markdown-alert-icon\" aria-hidden=\"true\" width=\"18\" height=\"18\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 16h.01\"></path><path d=\"M12 8v4\"></path><path d=\"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z\"></path></svg><span>注意</span></div><div class=\"markdown-alert-body\"><p>不要用虚拟卡，预付卡，甲骨文不支持，强行尝试还会黑你自己的IP！！！</p>\n</div></aside><h2 id=\"区域选择\">区域选择</h2><p>注册的时候会让你选择一个账户主区域，选择后 <strong>不可更改</strong> ，我选择的是 <strong>Japan East (Tokyo)</strong> 。由于甲骨文的arm免费机是需要抢的，你选择的区域越热门，能抢到arm机子的概率就越低</p>\n<h2 id=\"安全性\">安全性</h2><blockquote>\n<p><a href=\"https://cloud.oracle.com/identity/domains/my-profile/security\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloud.oracle.com/identity/domains/my-profile/security</a></p>\n</blockquote>\n<p>建议启用 <strong>两步验证</strong> </p>\n<p>使用你的移动设备下载一个甲骨文App 然后扫码即可（实际上就是一个联网的TOTP）</p>\n<p>又或者你可以勾选 <strong>离线验证</strong> 就可以使用一个离线的TOTP，通过 Bitwarden 等验证器来导入了，无需下载甲骨文的专有软件</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-07-32-image.webp\" alt=\"\" width=\"1282\" height=\"378\" loading=\"eager\" decoding=\"async\" /></p>\n<p>如果需要更改密码，它在这里</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-08-48-image.webp\" alt=\"\" width=\"2560\" height=\"1380\" loading=\"lazy\" decoding=\"async\" /></p>\n<h2 id=\"没有debian系统\">没有Debian系统？</h2><p>如果你前往 <a href=\"https://cloud.oracle.com/compute/instances/create\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloud.oracle.com/compute/instances/create</a> 尝试创建实例。会发现没有 <strong>Debian</strong> 映像 。我们可以通过最下面 <strong>我的映像</strong> 来上传自己的自定义映像，详细步骤往下看</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-12-08-image.webp\" alt=\"\" width=\"1595\" height=\"711\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>写在前面，如果你需要往甲骨文上传自定义映像，你需要先将自定义映像上传到你 <strong>甲骨文账户下的对象存储</strong> ，随便找一个对象存储上传是不行的！！！</p>\n<p>首先下载适用于云的Debian映像，进入 <a href=\"https://www.debian.org/distrib\" target=\"_blank\" rel=\"noopener noreferrer\">下载 Debian</a> ，找到 <strong>使用 Debian 云镜像</strong> 分别下载 </p>\n<ul>\n<li>64 位 AMD/Intel (<a href=\"https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2\" title=\"用于 64 位 AMD/Intel 的 OpenStack 镜像，qcow2\" target=\"_blank\" rel=\"noopener noreferrer\">qcow2</a>, <a href=\"https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.raw\" title=\"用于 64 位 AMD/Intel 的 OpenStack 镜像，raw\" target=\"_blank\" rel=\"noopener noreferrer\">raw</a>)</li>\n<li>64 位 ARM (<a href=\"https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-arm64.qcow2\" title=\"用于 64 位 ARM 的 OpenStack 镜像，qcow2\" target=\"_blank\" rel=\"noopener noreferrer\">qcow2</a>, <a href=\"https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-arm64.raw\" title=\"用于 64 位 ARM 的 OpenStack 镜像，raw\" target=\"_blank\" rel=\"noopener noreferrer\">raw</a>)</li>\n</ul>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-17-19-image.webp\" alt=\"\" width=\"2550\" height=\"1245\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>你会得到</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-17-50-image.webp\" alt=\"\" width=\"767\" height=\"74\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>前往 <a href=\"https://cloud.oracle.com/object-storage/buckets\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloud.oracle.com/object-storage/buckets</a> 创建一个新存储桶，点击编辑可见性，改为 <strong>公共</strong> </p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-18-34-image.webp\" alt=\"\" width=\"2560\" height=\"1380\" loading=\"lazy\" decoding=\"async\" /></p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-19-23-image.webp\" alt=\"\" width=\"1273\" height=\"552\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>然后上载刚刚下载的映像</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-19-51-image.webp\" alt=\"\" width=\"475\" height=\"376\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>前往 <a href=\"https://cloud.oracle.com/compute/images\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloud.oracle.com/compute/images</a> 点击 <strong>导入映像</strong> 按需填写</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-21-06-image.webp\" alt=\"\" width=\"1063\" height=\"712\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>映像类型和启动模式如图填写（性能最大化）</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-21-30-image.webp\" alt=\"\" width=\"1609\" height=\"500\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>验收无误后，点击右下角的 <strong>导入映像</strong> ，大约需要 <strong>20min</strong> ，状态将变为 <strong>可用</strong></p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-22-25-image.webp\" alt=\"\" width=\"518\" height=\"180\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>点击其中一个映像，进入详情页面，针对于 <strong>arm映像</strong> 我们需要手动调节 <strong>兼容的配置</strong>。右上角点击 <strong>操作 - 编辑详细信息</strong></p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-24-48-image.webp\" alt=\"\" width=\"308\" height=\"404\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>全部打勾，保存更改</p>\n<p><em>仍然需要注意，创建实例的时候请看准是x86还是arm实例，x86实例无法使用arm映像，反之亦然</em></p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-25-10-image.webp\" alt=\"\" width=\"1967\" height=\"1109\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>然后点击右上角<strong>创建实例</strong>，即可使用自定义映像创建实例</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-23-21-image.webp\" alt=\"\" width=\"2550\" height=\"1245\" loading=\"lazy\" decoding=\"async\" /></p>\n<h2 id=\"创建vcn-网络\">创建VCN（网络）</h2><p>前往 <a href=\"https://cloud.oracle.com/networking/vcns\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloud.oracle.com/networking/vcns</a> 点击 <strong>创建VCN</strong> 改个名称然后一路下一步即可</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-27-25-image.webp\" alt=\"\" width=\"334\" height=\"205\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>成功创建一个如图的网络</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-27-42-image.webp\" alt=\"\" width=\"2145\" height=\"560\" loading=\"lazy\" decoding=\"async\" /></p>\n<h2 id=\"为vcn附加ipv6前缀\">为VCN附加IPv6前缀</h2><p>前往 <a href=\"https://cloud.oracle.com/networking/vcns\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloud.oracle.com/networking/vcns</a></p>\n<p>进入我们刚刚创建的VCN\n<img src=\"https://b.acofork.com/img/oci-2025-09-09-06-18-57-image.webp\" alt=\"\" width=\"2164\" height=\"557\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>导航栏选择 <strong>子网</strong> - <strong>公共子网</strong></p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-09-06-19-57-image.webp\" alt=\"\" width=\"2165\" height=\"791\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>在新页面的导航栏点击 <strong>IP管理</strong></p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-09-06-20-29-image.webp\" alt=\"\" width=\"507\" height=\"235\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>往下滚动，添加 <strong>IPv6前缀</strong></p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-09-06-20-50-image.webp\" alt=\"\" width=\"277\" height=\"233\" loading=\"lazy\" decoding=\"async\" /></p>\n<h2 id=\"创建实例\">创建实例</h2><p>前往 <a href=\"https://cloud.oracle.com/compute/instances\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloud.oracle.com/compute/instances</a> 点击 <strong>创建实例</strong></p>\n<p>在这里可以更改映像为自定义映像，即我们刚刚上传的Debian映像</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-28-44-image.webp\" alt=\"\" width=\"877\" height=\"580\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>在这里可以更改 <strong>架构和配置</strong> 。永久免费套餐为</p>\n<ul>\n<li><p>VM.Standard.E2.1.Micro：<strong>两个</strong> 1c1g的x86 实例，<strong>不可合并为2c2g使用</strong></p>\n</li>\n<li><p>VM.Standard.A1.Flex：共 4c24g的arm64 实例，<strong>可以随意拆分</strong></p>\n</li>\n</ul>\n<p><strong>重要事项</strong></p>\n<p><strong>闲置计算实例的回收</strong></p>\n<p>Oracle 可能会回收闲置的“永久免费”计算实例。如果在 <strong>7 天周期内</strong> 同时满足以下条件，则虚拟机和裸金属计算实例会被视为闲置：</p>\n<ul>\n<li><p><strong>CPU 使用率</strong>（95 百分位数）低于 20%</p>\n</li>\n<li><p><strong>网络使用率</strong>低于 20%</p>\n</li>\n<li><p><strong>内存使用率</strong>低于 20%（仅适用于 A1 规格）</p>\n</li>\n</ul>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-31-25-image.webp\" alt=\"\" width=\"839\" height=\"397\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>在这里可以选择是否附加 <strong>IPv4</strong> 和 <strong>IPv6</strong> 地址，其中， <strong>IPv6</strong> 地址的附加功能取决于是否在VCN附加了 <strong>IPv6前缀</strong></p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-09-06-23-50-image.webp\" alt=\"\" width=\"1646\" height=\"987\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>在这里可以更改IO配置，直接拉满即可</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-03-28-29-image.webp\" alt=\"\" width=\"1125\" height=\"509\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>在这里可以更改SSH相关配置</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-31-09-image.webp\" alt=\"\" width=\"749\" height=\"406\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>一路下一步，验收无误后点击 <strong>创建</strong></p>\n<h2 id=\"重装系统-删除实例\">重装系统&amp;删除实例</h2><blockquote>\n<p>虽然甲骨文可以通过 <strong>更换引导盘</strong> 来进行重装系统，但更建议直接将实例删除。然后重新开一个</p>\n</blockquote>\n<p>选中你要删除的实例，选择 <strong>终止</strong> 即可。随后实例状态会变为 <strong>已终止</strong> </p>\n<p>此时资源就已经释放了，你可以重新再创建一台机子了</p>\n<p><img src=\"https://b.acofork.com/img/oci-oci.webp\" alt=\"\" width=\"306\" height=\"579\" loading=\"lazy\" decoding=\"async\" /></p>\n<h2 id=\"更改防火墙\">更改防火墙</h2><blockquote>\n<p>我直接改为全允许，我更喜欢在Linux服务器上配置 ufw 来实现防火墙\n不过由于甲骨文依赖于网络启动，ufw配置出现问题可能会起不来机子</p>\n</blockquote>\n<p>前往 <a href=\"https://cloud.oracle.com/networking/vcns\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloud.oracle.com/networking/vcns</a> ，进入你刚刚创建的VCN，导航栏点击 <strong>安全</strong> 找到这个</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-37-58-image.webp\" alt=\"\" width=\"2157\" height=\"812\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>导航栏继续找到 <strong>安全规则</strong> 我直接全放行</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-38-25-image.webp\" alt=\"\" width=\"2550\" height=\"1245\" loading=\"lazy\" decoding=\"async\" /></p>\n<h2 id=\"使用ssh连接实例\">使用SSH连接实例</h2><p>前往 <a href=\"https://cloud.oracle.com/compute/instances\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloud.oracle.com/compute/instances</a> 可以看到 <strong>公共IP</strong> ，携带你的 <strong>SSH私钥</strong> 通过 <strong>22 端口</strong> 连接服务器即可</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-39-59-image.webp\" alt=\"\" width=\"2157\" height=\"605\" loading=\"lazy\" decoding=\"async\" /></p>\n<h2 id=\"改root登录\">改root登录</h2><p>如果你使用root直接登录，会提示</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-41-53-image.webp\" alt=\"\" width=\"1136\" height=\"687\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>意为： <strong>请使用名为 <code>debian</code> 的用户登录而不是 <code>root</code> 用户</strong></p>\n<p>那我们就听他的，想把登录名改为 <strong>debian</strong></p>\n<p>再次尝试，成功登录了</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-43-13-image.webp\" alt=\"\" width=\"1136\" height=\"687\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>首先提权为 <strong>root</strong></p>\n<div class=\"markdown-code\" data-language=\"bash\"><div class=\"markdown-code-header\"><span class=\"markdown-code-language\"><svg class=\"code-language-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 19h8\"></path><path d=\"m4 17 6-6-6-6\"></path></svg><span>bash</span></span><button type=\"button\" class=\"code-block-copy\" aria-label=\"复制代码\" title=\"复制代码\"><svg class=\"code-block-copy-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"></rect><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"></path></svg></button></div><pre><code class=\"hljs language-bash\"><span class=\"hljs-built_in\">sudo</span> -i</code></pre></div><p>接着编辑root用户的ssh公钥文件，以允许直接使用root登录</p>\n<div class=\"markdown-code\" data-language=\"bash\"><div class=\"markdown-code-header\"><span class=\"markdown-code-language\"><svg class=\"code-language-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 19h8\"></path><path d=\"m4 17 6-6-6-6\"></path></svg><span>bash</span></span><button type=\"button\" class=\"code-block-copy\" aria-label=\"复制代码\" title=\"复制代码\"><svg class=\"code-block-copy-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"></rect><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"></path></svg></button></div><pre><code class=\"hljs language-bash\">nano /root/.ssh/authorized_keys</code></pre></div><p><strong>Ctrl+K</strong> 删除第一行的警告，并且重新写入你的SSH公钥</p>\n<p><strong>Ctrl+X</strong> 保存并退出，然后重启 <strong>sshd</strong> </p>\n<div class=\"markdown-code\" data-language=\"bash\"><div class=\"markdown-code-header\"><span class=\"markdown-code-language\"><svg class=\"code-language-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 19h8\"></path><path d=\"m4 17 6-6-6-6\"></path></svg><span>bash</span></span><button type=\"button\" class=\"code-block-copy\" aria-label=\"复制代码\" title=\"复制代码\"><svg class=\"code-block-copy-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"></rect><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"></path></svg></button></div><pre><code class=\"hljs language-bash\">systemctl restart sshd</code></pre></div><p>重新使用 <strong>root</strong> 登录，成功</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-00-46-59-image.webp\" alt=\"\" width=\"1136\" height=\"687\" loading=\"lazy\" decoding=\"async\" /></p>\n<h2 id=\"自动脚本抢arm机\">自动脚本抢arm机</h2><blockquote>\n<p>我们制作了一个 <strong>基于Cloudflare Worker</strong> 的自动抢机脚本 <a href=\"https://github.com/afoim/oci_auto_cfworker\" target=\"_blank\" rel=\"noopener noreferrer\">https://github.com/afoim/oci_auto_cfworker</a></p>\n</blockquote>\n<p>如果你在创建实例的时候选择arm，并且最后创建的时候提示</p>\n<p><strong>可用性域 VM.Standard.A1.Flex 中配置 AD-1 的容量不足。请在其他可用性域中创建实例，或稍后重试。如果指定了容错域，请尝试在不指定容错域的情况下创建实例。如果这样不起作用，请稍后重试。<a href=\"https://www.oracle.com/cloud/free/faq.html\" target=\"_blank\" rel=\"noopener noreferrer\">了解有关主机容量的更多信息。</a></strong></p>\n<p>字面意思，我们可以依靠一个自动脚本来无限重试</p>\n<p>前往 <a href=\"https://cloud.oracle.com/identity/domains/my-profile/auth-tokens\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloud.oracle.com/identity/domains/my-profile/auth-tokens</a> 点击 <strong>添加API密钥</strong> 并 <strong>下载私有密钥（只能下一次）</strong> ，然后会弹出 <strong>配置文件预览</strong> ，复制它，后面要用</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-01-00-00-image.webp\" alt=\"\" width=\"1629\" height=\"470\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>克隆仓库 <a href=\"https://github.com/chacuavip10/oci_auto\" target=\"_blank\" rel=\"noopener noreferrer\">chacuavip10/oci_auto</a></p>\n<p>编辑 <code>config</code> 内的内容，将内容清空，粘贴上一步的 <strong>配置文件预览</strong> 的内容。但是确保最后一行为</p>\n<div class=\"markdown-code\" data-language=\"bash\"><div class=\"markdown-code-header\"><span class=\"markdown-code-language\"><svg class=\"code-language-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 19h8\"></path><path d=\"m4 17 6-6-6-6\"></path></svg><span>bash</span></span><button type=\"button\" class=\"code-block-copy\" aria-label=\"复制代码\" title=\"复制代码\"><svg class=\"code-block-copy-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"></rect><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"></path></svg></button></div><pre><code class=\"hljs language-bash\">key_file=oci_private_key.pem</code></pre></div><p>前往 <a href=\"https://cloud.oracle.com/compute/instances/create\" target=\"_blank\" rel=\"noopener noreferrer\">https://cloud.oracle.com/compute/instances/create</a> 再次尝试创建一个arm机子，并且F12抓包，查看该包的详情</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-01-03-04-image.webp\" alt=\"\" width=\"1495\" height=\"584\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>对号入座填写 <code>oci_auto.py</code> 内的内容</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-01-08-08-image.webp\" alt=\"\" width=\"2090\" height=\"546\" loading=\"lazy\" decoding=\"async\" /></p>\n<p>安装依赖</p>\n<div class=\"markdown-code\" data-language=\"bash\"><div class=\"markdown-code-header\"><span class=\"markdown-code-language\"><svg class=\"code-language-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 19h8\"></path><path d=\"m4 17 6-6-6-6\"></path></svg><span>bash</span></span><button type=\"button\" class=\"code-block-copy\" aria-label=\"复制代码\" title=\"复制代码\"><svg class=\"code-block-copy-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"></rect><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"></path></svg></button></div><pre><code class=\"hljs language-bash\">apt install python3\napt install pip\npip install oci requests</code></pre></div><p>运行</p>\n<div class=\"markdown-code\" data-language=\"bash\"><div class=\"markdown-code-header\"><span class=\"markdown-code-language\"><svg class=\"code-language-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 19h8\"></path><path d=\"m4 17 6-6-6-6\"></path></svg><span>bash</span></span><button type=\"button\" class=\"code-block-copy\" aria-label=\"复制代码\" title=\"复制代码\"><svg class=\"code-block-copy-icon\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"></rect><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"></path></svg></button></div><pre><code class=\"hljs language-bash\">python3 oci_auto.py</code></pre></div><p>即可自动抢机子，可能几个月后，你的账户下就会多一台arm了（？</p>\n<p><img src=\"https://b.acofork.com/img/oci-2025-09-08-01-11-54-image.webp\" alt=\"\" width=\"1136\" height=\"687\" loading=\"lazy\" decoding=\"async\" /></p>\n","toc":[{"id":"老天保佑我不要abc","text":"老天保佑我不要ABC","depth":2},{"id":"区域选择","text":"区域选择","depth":2},{"id":"安全性","text":"安全性","depth":2},{"id":"没有debian系统","text":"没有Debian系统？","depth":2},{"id":"创建vcn-网络","text":"创建VCN（网络）","depth":2},{"id":"为vcn附加ipv6前缀","text":"为VCN附加IPv6前缀","depth":2},{"id":"创建实例","text":"创建实例","depth":2},{"id":"重装系统-删除实例","text":"重装系统&删除实例","depth":2},{"id":"更改防火墙","text":"更改防火墙","depth":2},{"id":"使用ssh连接实例","text":"使用SSH连接实例","depth":2},{"id":"改root登录","text":"改root登录","depth":2},{"id":"自动脚本抢arm机","text":"自动脚本抢arm机","depth":2}]}