{"id":395,"date":"2024-03-01T12:00:45","date_gmt":"2024-03-01T04:00:45","guid":{"rendered":"https:\/\/readu.com\/?p=395"},"modified":"2024-03-08T14:40:27","modified_gmt":"2024-03-08T06:40:27","slug":"raspberry-pi%ef%bc%88%e6%a0%91%e8%8e%93%e6%b4%be%ef%bc%89%e5%8f%8a%e9%98%bf%e9%87%8c%e4%ba%91cli%e8%bf%9c%e7%a8%8b%e5%94%a4%e9%86%92synology%ef%bc%88%e7%be%a4%e6%99%96%ef%bc%89%e5%8f%8a%e5%8a%a8","status":"publish","type":"post","link":"https:\/\/readu.com\/?p=395","title":{"rendered":"Raspberry Pi\uff08\u6811\u8393\u6d3e\uff09\u3001\u963f\u91cc\u4e91CLI\u8fdc\u7a0b\u5524\u9192Synology\uff08\u7fa4\u6656\uff09\u53ca\u52a8\u6001\u66f4\u65b0\u89e3\u6790\u516c\u7f51IP"},"content":{"rendered":"\n<p>\u81ea\u8fd0\u8425\u5546\u63d0\u4f9bIPv6\u516c\u7f51\u5730\u5740\u4ee5\u6765\uff0c\u4e00\u76f4\u901a\u8fc7\u963f\u91cc\u4e91\u57df\u540d\u89e3\u6790\u670d\u52a1\u8bbf\u95ee\u548c\u7ba1\u7406\u5bb6\u91cc\u7684Synology NAS\uff0cIPv6\u4e0b\u79fb\u52a8\u7aefAPP\u8fde\u63a5\u8fdf\u6ede\u548c\u9891\u7e41\u53d8\u52a8\u7684IPv4\u516c\u7f51\u5730\u5740\u4f7f\u5f97\u5728\u7fa4\u6656\u90e8\u7f72\u7684\u90ae\u4ef6\u7cfb\u7edf\u7b49\u4f9d\u8d56IPv4\u73af\u5883\u7684\u670d\u52a1\u4f53\u68c0\u6781\u5dee\uff0c\u4e0d\u80dc\u5176\u70e6\uff1b\u540c\u65f6\u4e00\u76f4\u6709\u4e00\u4e2a\u5fc3\u7ed3\uff0c\u5e0c\u671b\u80fd\u591f\u6839\u636e\u9700\u8981\uff0c\u5b9e\u73b0\u7fa4\u6656\u8fdc\u7a0b\u968f\u7528\u968f\u5f00\uff08\u81ea\u7528NAS\u591a\u6570\u65f6\u95f4\u90fd\u662f\u5728\u7a7a\u6302\uff09\uff0c\u4e00\u76f4\u627e\u4e0d\u5230\u5408\u9002\u7684\u89e3\u51b3\u65b9\u6848\u3002\u8fd1\u671f\u5728\u6363\u9f13\u6811\u8393\u6d3e\u53caDNS\u89e3\u6790\u65f6\u53d1\u73b0\u901a\u8fc7\u6811\u8393\u6d3e\u53ca\u963f\u91cc\u4e91CLI\u80fd\u591f\u8f83\u5b8c\u7f8e\u5b9e\u73b0\u76f8\u5e94\u9700\u6c42\uff0c\u4e14\u4e0d\u5f15\u5165\u7b2c\u4e09\u65b9\uff0c\u7d22\u6027\u8bb0\u5f55\u4e0b\u6765\u4e0e\u5927\u5bb6\u5206\u4eab\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u8f6f\u786c\u4ef6\u73af\u5883<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>NAS:\u7fa4\u66561621+<\/li>\n\n\n\n<li>\u5149\u732b:\u534e\u4e3a8145xr<\/li>\n\n\n\n<li>UPS:APC BK650M2<\/li>\n\n\n\n<li>\u6811\u8393\u6d3e5\uff08\u5176\u4ed6\u7248\u672c\u5e94\u8be5\u90fd\u53ef\u4ee5\uff0c\u6bd5\u7adf\u6ca1\u6709\u4ec0\u4e48\u5927\u8d1f\u8f7d\uff09<\/li>\n\n\n\n<li>\u8054\u901a\u5343\u5146\u5bbd\u5e26<\/li>\n\n\n\n<li>\u963f\u91cc\u4e91\u57df\u540d\u53ca\u4e91\u89e3\u6790DNS<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u57fa\u672c\u601d\u8def<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u901a\u8fc7SSH\u767b\u5f55\u6811\u8393\u6d3e\u5524\u9192\u5904\u4e8e\u540c\u4e00\u5c40\u57df\u7f51\u7684Synology NAS\u4e3b\u673a\uff1b<\/li>\n\n\n\n<li>\u7f16\u5199\u811a\u672c\uff0c\u5229\u7528\u963f\u91cc\u4e91\u89e3\u6790DNS\u548cCLI\u547d\u4ee4\u5b9a\u671f\u66f4\u65b0\u57df\u540d\u89e3\u6790\u8bb0\u5f55\u3002<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u51c6\u5907\u5de5\u4f5c<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1.\u5f00\u542f\u6811\u8393\u6d3eSSH\u8bbf\u95ee\u3002<\/h3>\n\n\n\n<p>\u5efa\u8bae\u5728\u70e7\u5f55\u6811\u8393\u6d3e\u7cfb\u7edf\u65f6\u8bbe\u7f6e\u7528\u6237\u540d\u53ca\u5bc6\u7801\uff0c\u5f00\u542fSSH\u652f\u6301\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"829\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-user-1024x829.png\" alt=\"\" class=\"wp-image-412\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-user-1024x829.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-user-300x243.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-user-768x622.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-user-1536x1244.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-user.png 1968w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"856\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-ssh-1024x856.png\" alt=\"\" class=\"wp-image-413\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-ssh-1024x856.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-ssh-300x251.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-ssh-768x642.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-ssh-1536x1284.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/rasp-ssh.png 1926w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u7cfb\u7edf\u542f\u52a8\u540e\u5373\u53ef\u5728\u5c40\u57df\u7f51\u5185\u4f7f\u7528\u7ec8\u7aef\u5de5\u5177\u901a\u8fc7SSH\u767b\u5f55\u6811\u8393\u6d3e\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-background-color has-background has-medium-font-size\"><code>ssh \u7528\u6237\u540d@\u6811\u8393\u6d3e\u5185\u7f51IP<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2.\u53d6\u5f97\u57df\u540d<\/h3>\n\n\n\n<p>\u76f8\u4fe1\u73a9NAS\u7684\u5c0f\u4f19\u4f34\u4e3a\u65b9\u4fbfNAS\u7684\u7ba1\u7406\u90fd\u5df2\u7533\u8bf7\u4e86\u57df\u540d\uff0c\u672c\u6587\u8981\u7528\u5230\u963f\u91cc\u4e91\u7684\u57df\u540d\u548c\u4e91\u89e3\u6790\u670d\u52a1\uff0c\u8fd8\u6ca1\u6709\u57df\u540d\u7684\u5c0f\u4f19\u4f34\u53ef\u5230<a href=\"https:\/\/wanwang.aliyun.com\/?scm=20140722.X_data-f6e54ce8c5180a496ee6._.V_1&amp;source=5176.11533457&amp;userCode=wsz55ojs\">\u963f\u91cc\u4e91<\/a>\u4e86\u89e3\u5e76\u7533\u8bf7\u6ce8\u518c\u81ea\u5df1\u7684\u57df\u540d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3.\u8bbe\u7f6e\u963f\u91cc\u4e91\u7528\u6237AccessKey<\/h3>\n\n\n\n<p class=\"is-style-plain\">\u963f\u91cc\u4e91\u547d\u4ee4\u884c\u5de5\u5177 CLI\uff08Alibaba Cloud CLI\uff09\u662f\u57fa\u4e8e\u963f\u91cc\u4e91\u5f00\u653e API \u5efa\u7acb\u7684\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528\u963f\u91cc\u4e91\u5f00\u653e API \u6765\u7ba1\u7406\u963f\u91cc\u4e91\u4ea7\u54c1\u3002\u5728\u5b89\u88c5\u914d\u7f6e\u963f\u91cc\u4e91CLI\u5de5\u5177\u65f6\u9700\u8981\u63d0\u4f9bAccessKey\u4fe1\u606f\uff0c\u9700\u63d0\u524d\u8bbe\u7f6e\u5e76\u83b7\u53d6\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u7b80\u8981\u6b65\u9aa4\uff0c\u7b80\u5c14\u8a00\u4e4b\u5c31\u662f\u521b\u5efa\u4e00\u4e2a\u4e13\u7528\u7684\u7528\u6237\uff0c\u53d6\u5f97AccessKey\uff0c\u5206\u914d\u76f8\u5e94\u6743\u9650\u3002<\/p>\n\n\n\n<p>\u8fdb\u5165<a href=\"https:\/\/www.aliyun.com\/?source=5176.11533457&amp;userCode=wsz55ojs\">\u963f\u91cc\u4e91<\/a>\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2&nbsp;<strong>\u63a7\u5236\u53f0<\/strong>&nbsp;\uff1b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"40\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-1024x40.png\" alt=\"\" class=\"wp-image-416\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-1024x40.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-300x12.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-768x30.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-1536x60.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-2048x79.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u5b8c\u6210\u767b\u5f55\u540e\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7528\u6237\u5934\u50cf\u533a\u57df\uff0c\u70b9\u51fb&nbsp;<strong>AccessKey\u7ba1\u7406<\/strong>&nbsp;\uff1b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"271\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak1-1024x271.png\" alt=\"\" class=\"wp-image-414\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak1-1024x271.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak1-300x79.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak1-768x203.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak1-1536x406.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak1-2048x542.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u5efa\u8bae\u6309\u7167\u5b98\u65b9\u5b89\u5168\u63d0\u793a\u4f7f\u7528\u5b50\u7528\u6237AccessKey\uff1b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"394\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak2-1024x394.png\" alt=\"\" class=\"wp-image-415\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak2-1024x394.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak2-300x115.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak2-768x296.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak2.png 1029w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u5728&nbsp;<strong>RAM\u8bbf\u95ee\u63a7\u5236<\/strong>&nbsp;\u2014\u2014&nbsp;<strong>\u7528\u6237<\/strong>&nbsp;\u9875\u9762\u70b9\u51fb&nbsp;<strong>\u521b\u5efa\u7528\u6237<\/strong>&nbsp;\uff1b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"256\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak3-1024x256.png\" alt=\"\" class=\"wp-image-417\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak3-1024x256.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak3-300x75.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak3-768x192.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak3-1536x383.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak3-2048x511.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u586b\u5165&nbsp;<strong>\u767b\u5f55\u540d\u79f0<\/strong>&nbsp;\uff0c\u52fe\u9009&nbsp;<strong>OpenAPI\u8c03\u7528\u8bbf\u95ee<\/strong>&nbsp;\uff0c\u70b9\u51fb&nbsp;<strong>\u786e\u5b9a<\/strong>&nbsp;\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"332\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak4-1024x332.png\" alt=\"\" class=\"wp-image-418\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak4-1024x332.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak4-300x97.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak4-768x249.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak4-1536x498.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak4-2048x665.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u7528\u6237\u521b\u5efa\u6210\u529f\u540e\uff0c\u5728&nbsp;<strong>\u521b\u5efa\u7528\u6237<\/strong>&nbsp;\u786e\u8ba4\u9875\u9762\uff0c\u70b9\u51fb&nbsp;<strong>\u4e0b\u8f7dCSV\u6587\u4ef6<\/strong>&nbsp;\u4fdd\u5b58\u7528\u6237\u4fe1\u606f\uff08\u8be5\u9875\u9762\u5173\u95ed\u540e\u5c06\u65e0\u6cd5\u518d\u6b21\u83b7\u53d6 \u201cAccessKey ID\u201d \u53ca \u201cAccessKey Secret\u201d \u4fe1\u606f\uff09\u3002\u70b9\u51fb&nbsp;<strong>\u6dfb\u52a0\u6743\u9650<\/strong>&nbsp;\uff0c\u5728&nbsp;<strong>\u7cfb\u7edf\u7b56\u7565<\/strong>\u4e2d\u641c\u7d22\u201cdns\u201d\uff0c\u9009\u62e9&nbsp;<strong>\u7ba1\u7406HTTPDNS\u3001\u4e91\u89e3\u6790DNS\u3001\u516c\u5171DNS\uff08PubDNS\uff09\u7684\u6743\u9650<\/strong>&nbsp;\uff0c\u70b9\u51fb&nbsp;<strong>\u786e\u5b9a<\/strong>&nbsp;\uff0c\u5b8c\u6210\u7528\u6237\u521b\u5efa\u53ca\u6743\u9650\u6dfb\u52a0\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak5-1024x588.png\" alt=\"\" class=\"wp-image-419\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak5-1024x588.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak5-300x172.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak5-768x441.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak5-1536x882.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak5-2048x1175.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u963f\u91cc\u4e91\u5b98\u65b9\u6587\u6863\u5f88\u8be6\u5c3d\u548c\u5b8c\u5584\uff0c\u5728\u9875\u9762\u5185\u5c31\u53ef\u4ee5\u627e\u5230\u9875\u9762\u5185\u5bb9\u7684\u5e2e\u52a9\u6587\u6863\uff0c\u53ef\u81ea\u884c\u67e5\u770b\u8bbe\u7f6e\u5951\u5408\u81ea\u8eab\u9700\u6c42\u7684\u529f\u80fd\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4.\u53d6\u5f97\u7fa4\u6656MAC\u5730\u5740<\/h3>\n\n\n\n<p>\u767b\u5f55\u7fa4\u6656\uff0c\u6253\u5f00&nbsp;<strong>\u63a7\u5236\u9762\u677f<\/strong>&nbsp;\uff0c\u8fdb\u5165&nbsp;<strong>\u4fe1\u606f\u4e2d\u5fc3<\/strong>&nbsp;\u2014\u2014&nbsp;<strong>\u7f51\u7edc<\/strong>&nbsp;\uff0c\u67e5\u770b\u8bb0\u5f55\u76f8\u5e94\u7f51\u7edc\u7aef\u53e3\u7684&nbsp;<strong>\u7f51\u7edc\u7269\u7406\u5730\u5740\uff08MAC address\uff09<\/strong>&nbsp;\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"618\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/mac-1024x618.png\" alt=\"\" class=\"wp-image-420\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/mac-1024x618.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/mac-300x181.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/mac-768x463.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/mac-1536x927.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/mac-2048x1235.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">5.\u5f00\u542f\u7fa4\u6656\u5185\u7f51\u5524\u9192<\/h3>\n\n\n\n<p>\u6253\u5f00 <strong>\u63a7\u5236\u9762\u677f\u2014\u2014\u786c\u4ef6\u548c\u7535\u6e90\u2014\u2014\u5e38\u89c4\u2014\u2014\u7535\u6e90\u81ea\u52a8\u6062\u590d<\/strong>\uff1a\u9009\u4e2d&nbsp;<strong>\u4fee\u590d\u7535\u6e90\u95ee\u9898\u540e\u81ea\u52a8\u91cd\u65b0\u542f\u52a8<\/strong>&nbsp;\u4e0e \u542f\u7528\u76f8\u5e94\u7aef\u53e3\u7684 <strong>\u7f51\u7edc\u5524\u9192<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"596\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/wakeup-1024x596.png\" alt=\"\" class=\"wp-image-422\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/wakeup-1024x596.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/wakeup-300x175.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/wakeup-768x447.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/wakeup-1536x894.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/wakeup-2048x1192.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>\u4fee\u590d\u7535\u6e90\u95ee\u9898\u540e\u81ea\u52a8\u91cd\u65b0\u542f\u52a8\uff1a<\/strong>\u5c40\u57df\u7f51\u5524\u9192\u7684\u524d\u63d0\u662f\u7cfb\u7edf\u6b63\u5e38\u5173\u673a\uff0c\u7f51\u5361\u6b63\u5e38\u52a0\u7535\uff0c\u56e0\u610f\u5916\u65ad\u7535\u5bfc\u81f4\u7684\u7cfb\u7edf\u5173\u673a\u3001\u7f51\u5361\u6389\u7535\u662f\u65e0\u6cd5\u5b9e\u73b0\u5524\u9192\u3002\u9009\u4e2d\u8be5\u9009\u9879\u53ef\u8ba9\u7fa4\u6656\u7cfb\u7edf\u56e0\u610f\u5916\u65ad\u7535\u5173\u673a\u60c5\u51b5\u4e0b\uff0c\u5728\u7535\u6e90\u6062\u590d\u540e\u81ea\u52a8\u5f00\u673a\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6.\u8bbe\u7f6e\u7aef\u53e3\u8f6c\u53d1<\/h3>\n\n\n\n<p>\u6839\u636e\u81ea\u8eab\u7f51\u7edc\u53ca\u786c\u4ef6\u60c5\u51b5\uff0c\u901a\u8fc7\u5149\u732b\u6216\u8def\u7531\u5668\u8bbe\u7f6e\u6811\u8393\u6d3eSSH\u7aef\u53e3\u76f8\u5e94\u7684IPv4\u53caIPv6\u8f6c\u53d1\u89c4\u5219\uff0c\u4f7f\u5916\u7f51\u80fd\u591f\u901a\u8fc7SSH\u8bbf\u95ee\u6811\u8393\u6d3e\uff0c\u9ed8\u8ba4\u7aef\u53e3\u4e3a22\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u5916\u7f51\u8bbf\u95ee\u6811\u8393\u6d3e<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1.\u83b7\u5f97\u6811\u8393\u6d3e\u516c\u7f51IP<\/h3>\n\n\n\n<p>\u65b9\u5f0f\u6709\u5f88\u591a\uff0c\u4f7f\u7528curl\u5de5\u5177\uff0c\u7b80\u5355\u76f4\u63a5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>#SSH\u767b\u5f55\u6811\u8393\u6d3e\n ssh \u7528\u6237\u540d@\u6811\u8393\u6d3e\u5185\u7f51IP\n#\u83b7\u53d6\u516c\u7f51IPv6\u5730\u5740\n curl ifconfig.me -ipv6\n#\u83b7\u53d6\u516c\u7f51IPv4\u5730\u5740\n curl ifconfig.me -ipv4<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>*   Trying 34.117.118.44:80...\n* Connected to ifconfig.me (34.117.118.44) port 80 (#0)\n&gt; GET \/ HTTP\/1.1\n&gt; Host: ifconfig.me\n&gt; User-Agent: curl\/7.88.1\n&gt; Accept: *\/*\n&gt;\n&lt; HTTP\/1.1 200 OK\nHTTP\/1.1 200 OK\n&lt; server: fasthttp\nserver: fasthttp\n&lt; date: Tue, 20 Feb 2024 07:16:07 GMT\ndate: Tue, 20 Feb 2024 07:16:07 GMT\n&lt; content-type: text\/plain\ncontent-type: text\/plain\n&lt; Content-Length: 13\nContent-Length: 13\n&lt; access-control-allow-origin: *\naccess-control-allow-origin: *\n&lt; via: 1.1 google\nvia: 1.1 google\n&lt;\n* Connection #0 to host ifconfig.me left intact\n222.333.444.555\n#\u8f93\u51fa\u7684\u7684\u6700\u540e\u4e00\u884c\u5373\u4e3a\u76f8\u5e94\u7684\u516c\u7f51IP\u3002\u5c06IPv4\u53caIPv6\u5730\u5740\u8bb0\u5f55\u4e0b\u6765\u3002<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2.\u8bbe\u7f6e\u57df\u540d\u89e3\u6790<\/h3>\n\n\n\n<p>\u8fdb\u5165<a href=\"https:\/\/www.aliyun.com\/?source=5176.11533457&amp;userCode=wsz55ojs\">\u963f\u91cc\u4e91<\/a>\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2&nbsp;<strong>\u63a7\u5236\u53f0<\/strong>&nbsp;\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"40\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-1024x40.png\" alt=\"\" class=\"wp-image-416\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-1024x40.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-300x12.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-768x30.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-1536x60.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/ak0-2048x79.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u5b8c\u6210\u767b\u5f55\u540e\uff0c\u70b9\u51fb\u5de6\u4e0a\u89d2\u56fe\u6807\uff0c\u5728&nbsp;<strong>\u4ea7\u54c1\u4e0e\u670d\u52a1<\/strong>&nbsp;\u4e2d\u9009\u62e9&nbsp;<strong>\u4e91\u89e3\u6790DNS<\/strong>&nbsp;\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"226\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns1-1024x226.png\" alt=\"\" class=\"wp-image-424\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns1-1024x226.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns1-300x66.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns1-768x169.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns1-1536x339.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns1-2048x452.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p> \u5728&nbsp;<strong>\u57df\u540d\u89e3\u6790<\/strong>&nbsp;\u2014\u2014&nbsp;<strong>\u6743\u5a01\u57df\u540d<\/strong>&nbsp;\u9875\u7b7e\u5355\u51fb\u76ee\u6807\u57df\u540d&nbsp;<strong>\u89e3\u6790\u8bbe\u7f6e<\/strong>&nbsp;\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"249\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns2-1024x249.png\" alt=\"\" class=\"wp-image-425\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns2-1024x249.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns2-300x73.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns2-768x187.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns2-1536x374.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns2-2048x498.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u5355\u51fb&nbsp;<strong>\u6dfb\u52a0\u8bb0\u5f55<\/strong>&nbsp;\u6309\u94ae\u3002\u5206\u522b\u6dfb\u52a0IPv4\u548cIPv6\u8bb0\u5f55\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns3-1024x588.png\" alt=\"\" class=\"wp-image-426\" srcset=\"https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns3-1024x588.png 1024w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns3-300x172.png 300w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns3-768x441.png 768w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns3-1536x882.png 1536w, https:\/\/readu.com\/wp-content\/uploads\/2024\/03\/dns3-2048x1176.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8bb0\u5f55\u7c7b\u578b\uff1aipv4\u9009\u62e9: A | ipv6\u9009\u62e9: AAAA \uff1b<\/li>\n\n\n\n<li>\u4e3b\u673a\u8bb0\u5f55\uff1a@\u3002\u4e00\u822c\u662f\u6307\u5b50\u57df\u540d\u7684\u524d\u7f00\uff08\u5982\u9700\u521b\u5efa\u5b50\u57df\u540d\u4e3awww.cloud-example.com, \u4e3b\u673a\u8bb0\u5f55 \u8f93\u5165 www\uff1b\u5982\u9700\u8bbe\u7f6e\u4e3b\u57df\u540d\u672c\u8eabdns-example.com\uff0c\u4e3b\u673a\u8bb0\u5f55 \u8f93\u5165 @\uff09\uff1b<\/li>\n\n\n\n<li>\u89e3\u6790\u8bf7\u6c42\u6765\u6e90\uff1a\u9ed8\u8ba4\uff1b<\/li>\n\n\n\n<li>\u8bb0\u5f55\u503c\uff1a\u8bb0\u5f55\u503c\u4e3aIP\u5730\u5740\uff0c\u586b\u5199\u4e4b\u524d\u53d6\u5f97\u7684\u6811\u8393\u6d3e\u516c\u7f51 IPv4|IPv6 \u5730\u5740\uff1b<\/li>\n\n\n\n<li>TTL\uff1a\u9ed8\u8ba4\u3002\u4e3a\u7f13\u5b58\u65f6\u95f4\uff0c\u6570\u503c\u8d8a\u5c0f\uff0c\u4fee\u6539\u8bb0\u5f55\u7406\u8bba\u4e0a\u5404\u5730\u751f\u6548\u65f6\u95f4\u8d8a\u77ed\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u5982\u7aef\u53e3\u8f6c\u53d1\u8bbe\u7f6e\u6b63\u786e\uff0c\u5728\u89e3\u6790\u8bb0\u5f55\u751f\u6548\u540e\u5373\u53ef\u5728\u5916\u7f51\u901a\u8fc7\u57df\u540d\u4f7f\u7528\u7ec8\u7aef\u5de5\u5177\u8bbf\u95ee\u767b\u5f55\u6811\u8393\u6d3e\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>ssh \u7528\u6237\u540d@\u57df\u540d<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u901a\u8fc7\u6811\u8393\u6d3e\u5524\u9192\u7fa4\u6656<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u5747\u5728\u7ec8\u7aef\u547d\u4ee4\u884c\u4e0b\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>#\u4f7f\u7528SSH\u8fde\u63a5\u767b\u5f55\u6811\u8393\u6d3e\u3002\n ssh \u7528\u6237\u540d@\u57df\u540d\n#\u8f93\u5165\u5bc6\u7801\uff0c\u5b8c\u6210\u767b\u5f55\n\n#\u5b89\u88c5wakeonlan\u5de5\u5177\n sudo apt install wakeonlan\n#\u5411\u5c40\u57df\u7f51\u53d1\u9001\u9b54\u672f\u5305\uff0c\u5524\u9192\u5bf9\u5e94MAC\u5730\u5740\u7684\u7f51\u7edc\u8bbe\u5907\n#\u586b\u5199\u4e4b\u524d\u8bb0\u5f55\u7684\u7fa4\u6656\u7f51\u7edc\u7aef\u53e3\u7684MAC\u5730\u5740\uff0c\u4ee5 *:* \u5206\u9694\n wakeonlan 00:00:00...\n\n#\u53ef\u4ee5\u5c06\u547d\u4ee4\u5199\u5165\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\uff0c\u51cf\u5c11\u6bcf\u6b21\u7684\u8f93\u5165\u64cd\u4f5c\n touch wake.sh\n vi wake.sh\n\n#!\/bin\/bash\n wakeonlan 00:00:00...\n\n#\u8bb0\u5f97\u6dfb\u52a0\u6267\u884c\u6743\u9650\n chmod +x wake.sh\n#\u4e4b\u540e\u5c31\u53ef\u4ee5\u901a\u8fc7\u6267\u884c\u8fd9\u4e2a\u811a\u672c\u6587\u4ef6\u5524\u9192\u7fa4\u6656\n .\/wake.sh<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u516d\u3001\u4f7f\u7528\u963f\u91cc\u4e91\u52a8\u6001\u66f4\u65b0\u57df\u540d\u89e3\u6790<\/h2>\n\n\n\n<p>\u56e0\u4f7f\u7528\u7684\u8054\u901a\u5bbd\u5e26IPv6\u516c\u7f51\u5730\u5740\u662f\u56fa\u5b9a\u7684\uff08\u4f7f\u7528\u4e86\u4e00\u5e74\u591a\u6ca1\u6709\u53d8\u8fc7\uff09\uff0cIPv4\u516c\u7f51\u5730\u5740\u4e09\u5929\u5de6\u53f3\u52a8\u6001\u66f4\u65b0\uff0c\u6240\u4ee5\u4ec5\u7ed9\u51fa\u4e86IPv4\u7684\u66f4\u65b0\u793a\u4f8b\uff0c\u5982\u679c\u9700\u8981\u66f4\u65b0IPv6\u4ec5\u9700\u6dfb\u52a0\u4e00\u6761\u76f8\u5e94\u7684\u963f\u91cc\u4e91CLI\u547d\u4ee4\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u5747\u5728\u7ec8\u7aef\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.\u5b89\u88c5\u963f\u91cc\u4e91CLI<\/h3>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>#\u4f7f\u7528SSH\u8fde\u63a5\u767b\u5f55\u6811\u8393\u6d3e\u3002\n ssh \u7528\u6237\u540d@\u57df\u540d\n#\u8f93\u5165\u5bc6\u7801\uff0c\u5b8c\u6210\u767b\u5f55\n\n#\u4e0b\u8f7d\u963f\u91cc\u4e91CLI\uff0c\u6811\u8393\u6d3e\u4e0b\u8f7darm64\n curl -O https:\/\/aliyuncli.alicdn.com\/aliyun-cli-linux-latest-arm64.tgz\n#\u89e3\u538b\uff0c\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6\u2014\u2014aliyun\n tar xzvf aliyun-cli-linux-latest-arm64.tgz\n#\u4f9d\u7167\u5b98\u65b9\u6587\u6863\u5efa\u8bae\uff0c\u5c06aliyun\u53ef\u6267\u884c\u6587\u4ef6\u590d\u5236\u5230\/usr\/local\/bin\u76ee\u5f55\u4e2d\n sudo cp aliyun \/usr\/local\/bin\n\n#\u53e6\uff1a\u8981\u786e\u4fddPATH\u7cfb\u7edf\u53d8\u91cf\u503c\u4e2d\u5b58\u5728\/usr\/local\/bin\u8def\u5f84\n#\u67e5\u770bPATH\u7cfb\u7edf\u53d8\u91cf\u7684\u503c\n $PATH\n#\u5982\u679c\/usr\/local\/bin\u4e0d\u5728\u5176\u4e2d\uff0c\u5219\u6dfb\u52a0\n export PATH=$PATH:\/usr\/local\/bin<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2.\u914d\u7f6e\u963f\u91cc\u4e91CLI\u51ed\u8bc1<\/h3>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>#\u6267\u884c\u914d\u7f6e\u547d\u4ee4\n aliyun configure --profile akProfile\n\n#\u6839\u636e\u63d0\u793a\uff0c\u5206\u522b\u5728 Access Key Id \u548c Access Key Secret \u5904\u586b\u5199\u4e4b\u524d\u4fdd\u5b58\u7684\u7528\u6237 Access Key Id \u548c Access Key Secret \u3002\n Configuring profile 'akProfile' in '' authenticate mode...\n Access Key Id &#91;]: Accesskey ID\n Access Key Secret &#91;]: AccessKey Secret\n Default Region Id &#91;]: cn-hangzhou\n Default Output Format &#91;json]: json (Only support json))\n Default Language &#91;zh|en] en:\n Saving profile&#91;akProfile] ...Done.<\/code><\/pre>\n\n\n\n<p>#\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u82e5\u914d\u7f6e\u51ed\u8bc1\u6709\u6548\uff0c\u663e\u793a\u5982\u4e0b\u4fe1\u606f\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">  Configure Done!!! &#8230;&#8230;&#8230;&#8230;..888888888888888888888 &#8230;&#8230;..=8888888888888888888D=&#8230;&#8230;&#8230;&#8230;.. &#8230;&#8230;&#8230;..88888888888888888888888 &#8230;&#8230;&#8230;.D8888888888888888888888I&#8230;&#8230;&#8230;.. &#8230;&#8230;&#8230;,8888888888888ZI: &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;=Z88D8888888888D&#8230;&#8230;&#8230;. &#8230;&#8230;&#8230;+88888888 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;88888888D&#8230;&#8230;&#8230;. &#8230;&#8230;&#8230;+88888888 &#8230;&#8230;.Welcome to use Alibaba Cloud&#8230;&#8230;.O8888888D&#8230;&#8230;&#8230;. &#8230;&#8230;&#8230;+88888888 &#8230;&#8230;&#8230;&#8230;. ************* &#8230;&#8230;&#8230;&#8230;..O8888888D&#8230;&#8230;&#8230;. &#8230;&#8230;&#8230;+88888888 &#8230;. Command Line Interface(Reloaded) &#8230;.O8888888D&#8230;&#8230;&#8230;. &#8230;&#8230;&#8230;+88888888&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.88888888D&#8230;&#8230;&#8230;. &#8230;&#8230;&#8230;.D888888888888DO+. &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..?ND888888888888D&#8230;&#8230;&#8230;. &#8230;&#8230;&#8230;..O8888888888888888888888&#8230;&#8230;&#8230;..D8888888888888888888888=&#8230;&#8230;&#8230;.. &#8230;&#8230;&#8230;&#8230; .:D8888888888888888888&#8230;&#8230;&#8230;78888888888888888888O &#8230;&#8230;&#8230;&#8230;..<\/p>\n<\/blockquote>\n\n\n\n<p>\u963f\u91cc\u4e91CLI\u5de5\u5177\u7684\u4e0b\u8f7d\u5b89\u88c5\u53ca\u914d\u7f6e\u7b49\uff0c\u5177\u4f53\u53ef\u53c2\u8003<a href=\"https:\/\/help.aliyun.com\/product\/29991.html?source=5176.11533457&amp;userCode=wsz55ojs\">\u963f\u91cc\u4e91CLI \u4ea7\u54c1\u6587\u6863<\/a>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3.\u83b7\u53d6\u548c\u66f4\u65b0\u57df\u540d\u89e3\u6790\u8bb0\u5f55<\/h3>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>#\u901a\u8fc7 aliyun alidns Describedomainrecords \u83b7\u53d6\u89e3\u6790\u8bb0\u5f55\u5217\u8868\n aliyun alidns DescribeDomainRecords --region cn-beijing --DomainName \u57df\u540d\n\n#\u5728\u8fd4\u56de\u6570\u636e\u4e2d\u67e5\u627e\u4e4b\u524d\u8bbe\u7f6e\u7684IPv4\uff08\u53caIPv6\uff09\u89e3\u6790\u8bb0\u5f55\uff0c\u8bb0\u5f55 RecordId \u503c\u3002\n\n#\u901a\u8fc7 aliyun alidns UpdateDomainRecord \u8bbe\u7f6e\u4fee\u6539\u57df\u540d\u89e3\u6790\u8bb0\u5f55\n aliyun alidns UpdateDomainRecord  --region cn-beijing --RR  \"@\"  --RecordId \"\u4e4b\u524d\u8bb0\u5f55\u7684\u8981\u4fee\u6539\u89e3\u6790\u8bb0\u5f55\u7684RecordId\"  --Type \"A\"  --Value \"\u65b0\u7684IPv4\u5730\u5740\"\n --RR:\u4e3b\u673a\u8bb0\u5f55\n --Type:\u8bb0\u5f55\u7c7b\u578b<\/code><\/pre>\n\n\n\n<p>\u5176\u4ed6API\u547d\u4ee4\u53ef\u4ee5\u901a\u8fc7\u963f\u91cc\u4e91\u5b98\u7f51<a href=\"https:\/\/api.aliyun.com\/api\/Alidns\/2015-01-09\/UpdateDomainRecord?tab=CLI\">\u4e91\u89e3\u6790API\u8c03\u8bd5<\/a>\u9875\u9762\u67e5\u770bCli\u793a\u4f8b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4.\u7f16\u5199\u66f4\u65b0\u811a\u672c<\/h3>\n\n\n\n<p>\u7efc\u5408\u4ecb\u7ecd\u76f8\u5173\u5185\u5bb9\uff0c\u5c06\u76f8\u5173\u64cd\u4f5c\u5199\u5165\u811a\u672c\u6587\u4ef6\uff0c\u4ee5\u4e0b\u662f\u793a\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code>#\u65b0\u5efaipv4.txt\u6587\u4ef6\uff0c\u8bb0\u5f55\u83b7\u53d6\u7684\u516c\u7f51IPv4\u5730\u5740\uff0c\u901a\u8fc7\u6bd4\u8f83\u65b0\u65e7\u503c\u5224\u65ad\u662f\u5426\u66f4\u65b0\u89e3\u6790\u8bb0\u5f55\n touch ipv4.txt\n#\u811a\u672c\u6587\u4ef6udns.sh\n touch udns.sh\n vi udns.sh\n\n#!\/bin\/bash\n#udns.log\u4e3a\u65e5\u5fd7\u6587\u4ef6\uff0c\u5c06\u5f53\u524d\u65f6\u95f4\u5199\u5165\u65e5\u5fd7\u6587\u4ef6\n date &gt;&gt; \u7edd\u5bf9\u8def\u5f84\/udns.log\n#\u5c06\u539fipv4.txt\u6587\u4ef6\u8bb0\u5f55\u7684\u5730\u5740\u8d4b\u503c\u7ed9oldip\u53d8\u91cf\n oldip=$(cat \"\u7edd\u5bf9\u8def\u5f84\/ipv4.txt\")\n#\u83b7\u53d6\u516c\u7f51IP\uff0c\u901a\u8fc7grep\u547d\u4ee4\u4ec5\u8bb0\u5f55\u6700\u540e\u4e00\u884cIP\u5730\u5740\u4fe1\u606f\uff0c &gt; \u8986\u76d6\u4e4b\u524d\u7684\u8bb0\u5f55\n curl ifconfig.me -ipv4 |grep -E '^&#91;0-9]' &gt; \"\u7edd\u5bf9\u8def\u5f84\/ipv4.txt\"\n newip=$(cat \"\u7edd\u5bf9\u8def\u5f84\/ipv4.txt\")\n if &#91; \"$newip\" != \"$oldip\" ];\n then\n#\u4fee\u6539\u57df\u540d\u89e3\u6790\u8bb0\u5f55\n \/usr\/local\/bin\/aliyun alidns UpdateDomainRecord  --region cn-beijing --RR  \"@\"  --RecordId \"\u8981\u4fee\u6539\u89e3\u6790\u8bb0\u5f55\u7684RecordId\"  --Type \"A\"  --Value $newip &gt;&gt; \u7edd\u5bf9\u8def\u5f84\/udns.log\n echo IPv4\u5730\u5740 $oldip \u66f4\u65b0\u4e3a $newip &gt;&gt; \u7edd\u5bf9\u8def\u5f84\/udns.log\n echo \"-------------------------------------------------------\" &gt;&gt; \u7edd\u5bf9\u8def\u5f84\/udns.log\n else\n echo IPv4\u5730\u5740 $oldip \u6ca1\u6709\u53d8\u66f4 &gt;&gt; \u7edd\u5bf9\u8def\u5f84\/udns.log\n echo \"-------------------------------------------------------\" &gt;&gt; \u7edd\u5bf9\u8def\u5f84\/udns.log\n fi\n\n\n#\u5c06\u811a\u672c\u6587\u4ef6\u8bbe\u7f6e\u4e3a\u53ef\u6267\u884c\n chmod +x udns.sh\n#\u901a\u8fc7\u6267\u884cudns.sh\u6587\u4ef6\u66f4\u65b0\u963f\u91cc\u4e91DNS\u89e3\u6790\u8bb0\u5f55\n .\/udns.sh\n\n#\u5c06\u811a\u672c\u8bbe\u7f6e\u4e3a\u5b9a\u671f\u4efb\u52a1\n crontab -e\n#\u6dfb\u52a0\u65b0\u7684\u4efb\u52a1\uff0c\u6bcf\u5c0f\u65f6\u6267\u884c\u4e00\u6b21\n 0 * * * * \u7edd\u5bf9\u8def\u5f84\/udns.sh<\/code><\/pre>\n\n\n\n<p>\u4ee5\u4e0a\u5c31\u662f\u5229\u7528\u6811\u8393\u6d3e\u53ca\u963f\u91cc\u4e91CLI\u8fdc\u7a0b\u5524\u9192\u7fa4\u6656\u53ca\u52a8\u6001\u66f4\u65b0\u89e3\u6790\u516c\u7f51IP\u7684\u7b80\u8981\u5b9e\u73b0\uff0c\u629b\u7816\u5f15\u7389\u3002\u56e0\u662f\u4e8b\u540e\u6574\u7406\uff0c\u6d41\u7a0b\u548c\u624b\u5de5\u5f55\u5165\u96be\u514d\u6709\u758f\u6f0f\u548c\u9519\u8bef\u4e4b\u5904\uff0c\u8bf7\u5927\u5bb6\u6279\u8bc4\u6307\u6b63\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u8fd0\u8425\u5546\u63d0\u4f9bIPv6\u516c\u7f51\u5730\u5740\u4ee5\u6765\uff0c\u4e00\u76f4\u901a\u8fc7\u963f\u91cc\u4e91\u57df\u540d\u89e3\u6790\u670d\u52a1\u8bbf\u95ee\u548c\u7ba1\u7406\u5bb6\u91cc\u7684Synology NAS\uff0cIPv6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":431,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[30,38,29,34,39,33,32,31],"class_list":["post-395","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-28","tag-raspberry-pi","tag-synology-nas","tag-29","tag-34","tag-39","tag-cli","tag-dns","tag-31"],"_links":{"self":[{"href":"https:\/\/readu.com\/index.php?rest_route=\/wp\/v2\/posts\/395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/readu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/readu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/readu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/readu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=395"}],"version-history":[{"count":24,"href":"https:\/\/readu.com\/index.php?rest_route=\/wp\/v2\/posts\/395\/revisions"}],"predecessor-version":[{"id":457,"href":"https:\/\/readu.com\/index.php?rest_route=\/wp\/v2\/posts\/395\/revisions\/457"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/readu.com\/index.php?rest_route=\/wp\/v2\/media\/431"}],"wp:attachment":[{"href":"https:\/\/readu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/readu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/readu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}