{"id":667,"date":"2025-07-27T09:58:21","date_gmt":"2025-07-27T01:58:21","guid":{"rendered":"https:\/\/www.vcidc.net\/blog\/?p=667"},"modified":"2025-07-27T09:58:21","modified_gmt":"2025-07-27T01:58:21","slug":"%e5%a6%82%e4%bd%95%e8%ae%be%e7%bd%ae%e4%b8%80%e4%b8%aa%e6%97%b6%e9%97%b4%e5%90%8c%e6%ad%a5%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%9a%84%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.vcidc.net\/blog\/667.html","title":{"rendered":"\u5982\u4f55\u8bbe\u7f6e\u4e00\u4e2a\u65f6\u95f4\u540c\u6b65\u670d\u52a1\u5668\u7684\u6307\u5357"},"content":{"rendered":"<p><p>\u5728\u8ba1\u7b97\u673a\u7f51\u7edc\u4e2d\uff0c\u65f6\u95f4\u540c\u6b65\u5bf9\u4e8e\u786e\u4fdd\u7cfb\u7edf\u65e5\u5fd7\u3001\u4e8b\u52a1\u5904\u7406\u548c\u5206\u5e03\u5f0f\u5e94\u7528\u7684\u4e00\u81f4\u6027\u81f3\u5173\u91cd\u8981\u3002\u672c\u6587\u5c06\u6307\u5bfc\u60a8\u5982\u4f55\u8bbe\u7f6e\u4e00\u4e2a\u65f6\u95f4\u540c\u6b65\u670d\u52a1\u5668\uff0c\u4ee5\u786e\u4fdd\u60a8\u7684\u7f51\u7edc\u4e2d\u7684\u6240\u6709\u8bbe\u5907\u90fd\u62e5\u6709\u51c6\u786e\u7684\u65f6\u95f4\u3002\u6211\u4eec\u5c06\u4f7f\u7528NTP\uff08Network Time Protocol\uff09\u6765\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u3002<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.vcidc.net\/blog\/wp-content\/uploads\/2025\/07\/rhaB08J6.jpg\" alt=\"\u5982\u4f55\u8bbe\u7f6e\u4e00\u4e2a\u65f6\u95f4\u540c\u6b65\u670d\u52a1\u5668\u7684\u6307\u5357\" title=\"\u5982\u4f55\u8bbe\u7f6e\u4e00\u4e2a\u65f6\u95f4\u540c\u6b65\u670d\u52a1\u5668\u7684\u6307\u5357\"><\/p>\n<\/p>\n<p><h2>\u64cd\u4f5c\u524d\u7684\u51c6\u5907\u6216\u80cc\u666f\u4ecb\u7ecd<\/h2>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u6709\u4ee5\u4e0b\u51c6\u5907\u5de5\u4f5c\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u4e00\u53f0\u7a33\u5b9a\u8fd0\u884c\u7684Linux\u670d\u52a1\u5668\u6216VPS\u3002<\/li>\n<li>\u670d\u52a1\u5668\u62e5\u6709\u4e92\u8054\u7f51\u8bbf\u95ee\u6743\u9650\u3002<\/li>\n<li>root\u6216sudo\u6743\u9650\u3002<\/li>\n<\/ul>\n<p><h2>\u5b89\u88c5NTP\u670d\u52a1<\/h2>\n<\/p>\n<p><h3>1. \u5b89\u88c5NTP\u5b88\u62a4\u8fdb\u7a0b<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5NTP\u5b88\u62a4\u8fdb\u7a0b\uff1a<\/p>\n<\/p>\n<p><pre><code>sudo apt-get update<\/p>\r\n<p>sudo apt-get install ntp<\/code><\/pre>\n<\/p>\n<p><h3>2. \u542f\u52a8NTP\u670d\u52a1<\/h3>\n<\/p>\n<p><p>\u542f\u52a8NTP\u670d\u52a1\u5e76\u8bbe\u7f6e\u5176\u5f00\u673a\u81ea\u542f\uff1a<\/p>\n<\/p>\n<p><pre><code>sudo systemctl start ntp<\/p>\r\n<p>sudo systemctl enable ntp<\/code><\/pre>\n<\/p>\n<p><h2>\u914d\u7f6eNTP\u670d\u52a1\u5668<\/h2>\n<\/p>\n<p><h3>1. \u7f16\u8f91NTP\u914d\u7f6e\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u7f16\u8f91NTP\u7684\u914d\u7f6e\u6587\u4ef6\u4ee5\u6dfb\u52a0\u6216\u4fee\u6539\u65f6\u95f4\u670d\u52a1\u5668\uff1a<\/p>\n<\/p>\n<p><pre><code>sudo nano \/etc\/ntp.conf<\/code><\/pre>\n<\/p>\n<p><p>\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff0c\u4ee5\u6307\u5b9aNTP\u670d\u52a1\u5668\uff08\u4ee5Google NTP\u670d\u52a1\u5668\u4e3a\u4f8b\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code>server 0.time.google.com<\/p>\r\n<p>server 1.time.google.com<\/p>\r\n<p>server 2.time.google.com<\/p>\r\n<p>server 3.time.google.com<\/code><\/pre>\n<\/p>\n<p><h3>2. \u91cd\u542fNTP\u670d\u52a1<\/h3>\n<\/p>\n<p><p>\u4fdd\u5b58\u5e76\u5173\u95ed\u914d\u7f6e\u6587\u4ef6\uff0c\u7136\u540e\u91cd\u542fNTP\u670d\u52a1\u4ee5\u5e94\u7528\u66f4\u6539\uff1a<\/p>\n<\/p>\n<p><pre><code>sudo systemctl restart ntp<\/code><\/pre>\n<\/p>\n<p><h2>\u6d4b\u8bd5NTP\u670d\u52a1<\/h2>\n<\/p>\n<p><h3>1. \u68c0\u67e5NTP\u670d\u52a1\u72b6\u6001<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5NTP\u670d\u52a1\u72b6\u6001\uff0c\u786e\u4fdd\u5b83\u6b63\u5728\u8fd0\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code>sudo systemctl status ntp<\/code><\/pre>\n<\/p>\n<p><h3>2. \u9a8c\u8bc1\u65f6\u95f4\u540c\u6b65<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1\u4e0eNTP\u670d\u52a1\u5668\u7684\u540c\u6b65\u72b6\u6001\uff1a<\/p>\n<\/p>\n<p><pre><code>sudo ntpstat<\/code><\/pre>\n<\/p>\n<p><p>\u60a8\u5e94\u8be5\u770b\u5230\u540c\u6b65\u72b6\u6001\u4e3a\u201csynchronised to\u201d\uff0c\u5e76\u4e14\u504f\u79fb\u91cf\u4e3a\u201c0.000\u201d\u3002<\/p>\n<\/p>\n<p><h2>\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898\u4e0e\u89e3\u51b3\u65b9\u6848<\/h2>\n<\/p>\n<ul>\n<li><strong>\u95ee\u9898\uff1a<\/strong> NTP\u670d\u52a1\u65e0\u6cd5\u542f\u52a8\u3002<\/p>\n<li><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong> \u786e\u4fdd\u60a8\u7684\u670d\u52a1\u5668\u6709\u4e92\u8054\u7f51\u8bbf\u95ee\u6743\u9650\uff0c\u5e76\u4e14NTP\u5b88\u62a4\u8fdb\u7a0b\u5df2\u6b63\u786e\u5b89\u88c5\u3002<\/li>\n<\/li>\n<li><strong>\u95ee\u9898\uff1a<\/strong> \u65f6\u95f4\u540c\u6b65\u4e0d\u51c6\u786e\u3002<\/p>\n<li><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong> \u786e\u4fdd\u60a8\u5df2\u5c06\u6b63\u786e\u7684NTP\u670d\u52a1\u5668\u5730\u5740\u6dfb\u52a0\u5230\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u5e76\u91cd\u542fNTP\u670d\u52a1\u3002<\/li>\n<\/ul>\n<p><h2>\u7ed3\u8bba<\/h2>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u5df2\u7ecf\u6210\u529f\u8bbe\u7f6e\u4e86\u4e00\u4e2a\u65f6\u95f4\u540c\u6b65\u670d\u52a1\u5668\uff0c\u5e76\u786e\u4fdd\u4e86\u7f51\u7edc\u4e2d\u7684\u8bbe\u5907\u62e5\u6709\u51c6\u786e\u7684\u65f6\u95f4\u3002\u8fd9\u6709\u52a9\u4e8e\u63d0\u9ad8\u7cfb\u7edf\u65e5\u5fd7\u7684\u4e00\u81f4\u6027\u548c\u5206\u5e03\u5f0f\u5e94\u7528\u7684\u6570\u636e\u540c\u6b65\u3002<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u8ba1\u7b97\u673a\u7f51\u7edc\u4e2d\uff0c\u65f6\u95f4\u540c\u6b65\u5bf9\u4e8e\u786e\u4fdd\u7cfb\u7edf\u65e5\u5fd7\u3001\u4e8b\u52a1\u5904\u7406\u548c\u5206\u5e03\u5f0f\u5e94\u7528\u7684\u4e00\u81f4\u6027\u81f3\u5173\u91cd\u8981\u3002\u672c\u6587\u5c06\u6307\u5bfc\u60a8\u5982\u4f55\u8bbe\u7f6e\u4e00\u4e2a\u65f6\u95f4\u540c\u6b65\u670d\u52a1\u5668\uff0c\u4ee5\u786e\u4fdd\u60a8\u7684\u7f51\u7edc\u4e2d\u7684\u6240\u6709\u8bbe\u5907\u90fd\u62e5\u6709\u51c6\u786e\u7684\u65f6\u95f4\u3002\u6211\u4eec\u5c06\u4f7f\u7528NTP\uff08Network Time Protocol\uff09\u6765\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807&#8230;<\/p>\n","protected":false},"author":1,"featured_media":668,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[283,77,19],"topic":[],"class_list":["post-667","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-overseas-server","tag-ntp","tag-sudo","tag-19"],"_links":{"self":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts\/667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/comments?post=667"}],"version-history":[{"count":1,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts\/667\/revisions"}],"predecessor-version":[{"id":670,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/posts\/667\/revisions\/670"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/media\/668"}],"wp:attachment":[{"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/media?parent=667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/categories?post=667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/tags?post=667"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.vcidc.net\/blog\/wp-json\/wp\/v2\/topic?post=667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}