{"id":18221,"date":"2024-11-18T13:13:15","date_gmt":"2024-11-18T05:13:15","guid":{"rendered":"https:\/\/fwq.ai\/blog\/18221\/"},"modified":"2024-11-18T13:13:15","modified_gmt":"2024-11-18T05:13:15","slug":"linux%e5%90%8c%e6%ad%a5%e6%97%b6%e9%97%b4%e6%80%8e%e4%b9%88%e8%ae%be%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/18221\/","title":{"rendered":"linux\u540c\u6b65\u65f6\u95f4\u600e\u4e48\u8bbe\u7f6e"},"content":{"rendered":"<blockquote><p>\n  \u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u53ef\u5728 linux \u4e2d\u8bbe\u7f6e\u65f6\u95f4\u540c\u6b65\uff1a\u5b89\u88c5 ntp \u670d\u52a1\u542f\u7528 ntp \u670d\u52a1\u914d\u7f6e ntp \u670d\u52a1\u5668\uff0c\u6dfb\u52a0\u53ef\u7528\u670d\u52a1\u5668\uff08\u5982 time.google.com\uff09\u91cd\u542f ntp \u670d\u52a1\u9700\u786e\u4fdd ntp \u670d\u52a1\u5668\u53ef\u8bbf\u95ee\u4e14\u7a33\u5b9a\uff0c\u5e76\u5b9a\u671f\u68c0\u67e5\u670d\u52a1\u72b6\u6001\u3002\u5982\u6709\u5fc5\u8981\uff0c\u8c28\u614e\u4f7f\u7528 date -s \u547d\u4ee4\u624b\u52a8\u8c03\u6574\u7cfb\u7edf\u65f6\u95f4\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/04\/2024060414451939469.jpg\" class=\"aligncenter\" title=\"linux\u540c\u6b65\u65f6\u95f4\u600e\u4e48\u8bbe\u7f6e\u63d2\u56fe\" alt=\"linux\u540c\u6b65\u65f6\u95f4\u600e\u4e48\u8bbe\u7f6e\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5728 Linux \u4e2d\u8bbe\u7f6e\u65f6\u95f4\u540c\u6b65<\/strong><\/p>\n<p><strong>\u5982\u4f55\u8bbe\u7f6e Linux \u540c\u6b65\u65f6\u95f4\uff1f<\/strong><\/p>\n<p>\u5728 Linux \u7cfb\u7edf\u4e2d\u8bbe\u7f6e\u65f6\u95f4\u540c\u6b65\uff0c\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5 NTP \u670d\u52a1\uff1a<\/strong><\/p>\n<ul>\n<li>CentOS\/Red Hat\uff1ayum install ntp<\/li>\n<li>Debian\/Ubuntu\uff1aapt install ntp<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u542f\u7528 NTP \u670d\u52a1\uff1a<\/strong><\/p>\n<ul>\n<li>CentOS\/Red Hat\uff1asystemctl start ntpd<\/li>\n<li>Debian\/Ubuntu\uff1aservice ntp start<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e NTP \u670d\u52a1\u5668\uff1a<\/strong><\/p>\n<ul>\n<li>\u7f16\u8f91 \/etc\/ntp.conf \u6587\u4ef6\u3002<\/li>\n<li>\n<p>\u5c06 server \u884c\u6ce8\u91ca\u6389\u5e76\u6dfb\u52a0\u53ef\u7528\u7684 NTP \u670d\u52a1\u5668\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>#server 0.debian.pool.ntp.org\nserver time.google.com<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u91cd\u542f NTP \u670d\u52a1\uff1a<\/strong><\/p>\n<ul>\n<li>CentOS\/Red Hat\uff1asystemctl restart ntpd<\/li>\n<li>Debian\/Ubuntu\uff1aservice ntp restart<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><strong>\u5176\u4ed6\u6ce8\u610f\u4e8b\u9879\uff1a<\/strong><\/p>\n<ul>\n<li>\u786e\u4fdd\u4f7f\u7528\u7684 NTP \u670d\u52a1\u5668\u53ef\u8bbf\u95ee\u4e14\u7a33\u5b9a\u3002<\/li>\n<li>\u5b9a\u671f\u68c0\u67e5 NTP \u670d\u52a1\u7684\u72b6\u6001 (systemctl status ntpd \u6216 service ntp status)\u3002<\/li>\n<li>\u5982\u679c\u7cfb\u7edf\u65f6\u95f4\u6709\u8f83\u5927\u5dee\u5f02\uff0c\u53ef\u4ee5\u624b\u52a8\u8c03\u6574\u65f6\u95f4\uff0c\u4f46\u5e94\u8c28\u614e\u64cd\u4f5c\u3002\u4f7f\u7528 date -s \u547d\u4ee4\u53ef\u4ee5\u8bbe\u7f6e\u7cfb\u7edf\u65f6\u95f4\uff0c\u4f46\u8981\u6ce8\u610f\u53ef\u80fd\u7834\u574f\u7cfb\u7edf\u65e5\u5fd7\u7b49\u65f6\u95f4\u76f8\u5173\u7684\u529f\u80fd\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u540c\u6b65\u65f6\u95f4\u600e\u4e48\u8bbe\u7f6e\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u53ef\u5728 linux \u4e2d\u8bbe\u7f6e\u65f6\u95f4\u540c\u6b65\uff1a\u5b89\u88c5 ntp \u670d\u52a1\u542f\u7528 ntp \u670d\u52a1\u914d\u7f6e ntp \u670d\u52a1\u5668\uff0c\u6dfb\u52a0\u53ef\u7528\u670d\u52a1\u5668\uff08\u5982 time.google.com\uff09\u91cd\u542f ntp \u670d\u52a1\u9700\u786e\u4fdd ntp \u670d\u52a1\u5668\u53ef\u8bbf\u95ee\u4e14\u7a33\u5b9a\uff0c\u5e76\u5b9a\u671f\u68c0\u67e5\u670d\u52a1\u72b6\u6001\u3002\u5982\u6709\u5fc5\u8981\uff0c\u8c28\u614e\u4f7f\u7528 date -s \u547d\u4ee4\u624b\u52a8\u8c03\u6574\u7cfb\u7edf\u65f6\u95f4\u3002 \u5728 Linux \u4e2d\u8bbe\u7f6e\u65f6\u95f4\u540c\u6b65 \u5982\u4f55\u8bbe\u7f6e Linux \u540c\u6b65\u65f6\u95f4\uff1f \u5728 Linux \u7cfb\u7edf\u4e2d\u8bbe\u7f6e\u65f6\u95f4\u540c\u6b65\uff0c\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a \u5b89\u88c5 NTP \u670d\u52a1\uff1a CentOS\/Red Hat\uff1ayum install ntp Debian\/Ubuntu\uff1aapt install ntp \u542f\u7528 NTP \u670d\u52a1\uff1a CentOS\/Red Hat\uff1asystemctl start ntpd Debian\/Ubuntu\uff1aservice ntp start \u914d\u7f6e NTP \u670d\u52a1\u5668\uff1a \u7f16\u8f91 \/etc\/ntp.conf \u6587\u4ef6\u3002 \u5c06 server \u884c\u6ce8\u91ca\u6389\u5e76\u6dfb\u52a0\u53ef\u7528\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-18221","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=18221"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18221\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=18221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=18221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=18221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}