{"id":151567,"date":"2019-07-26T09:06:00","date_gmt":"2019-07-26T01:06:00","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=151567"},"modified":"2019-07-23T09:16:09","modified_gmt":"2019-07-23T01:16:09","slug":"linux-network-clock","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-network-clock.html","title":{"rendered":"Linux \u7f51\u7edc\u65f6\u95f4\u540c\u6b65"},"content":{"rendered":"

Linux\u7684\u65f6\u95f4\u5206\u4e3aSystem Clock\uff08\u7cfb\u7edf\u65f6\u95f4\uff09\u548cReal Time Clock \uff08\u786c\u4ef6\u65f6\u95f4\uff0c\u7b80\u79f0RTC\uff09\u3002<\/p>\n

\u7cfb\u7edf\u65f6\u95f4\uff1a\u6307\u5f53\u524dLinux Kernel\u4e2d\u7684\u65f6\u95f4\u3002<\/p>\n

\u786c\u4ef6\u65f6\u95f4\uff1a\u4e3b\u677f\u4e0a\u6709\u7535\u6c60\u4f9b\u7535\u7684\u65f6\u95f4\u3002<\/p>\n

\u67e5\u770b\u7cfb\u7edf\u65f6\u95f4\u7684\u547d\u4ee4\uff1a<\/span> #date<\/span>\r\n\r\n\u8bbe\u7f6e\u7cfb\u7edf\u65f6\u95f4\u7684\u547d\u4ee4\uff1a<\/span> #date<\/span> \u2013<\/span>set<\/span>\uff08\u6708<\/span>\/\u65e5<\/span>\/\u5e74<\/span> \u65f6\uff1a\u5206\uff1a\u79d2\uff09<\/span>\r\n\r\n\u4f8b\uff1a<\/span>#date<\/span> \u2013<\/span>set<\/span> \u201c<\/span>10<\/span>\/11<\/span>\/10<\/span> 10<\/span>:15<\/span>\u201d<\/span>\r\n\r\n\u67e5\u770b\u786c\u4ef6\u65f6\u95f4\u7684\u547d\u4ee4\uff1a<\/span> # hwclock\r\n\r\n\u8bbe\u7f6e\u786c\u4ef6\u65f6\u95f4\u7684\u547d\u4ee4\uff1a<\/span> # hwclock \u2013<\/span>set<\/span> \u2013<\/span>date<\/span> = \uff08\u6708<\/span>\/\u65e5<\/span>\/\u5e74<\/span> \u65f6\uff1a\u5206\uff1a\u79d2\uff09<\/span>\r\n\r\n\u4e0a\u8ff0\u63d0\u5230\u7684\u662f\u624b\u52a8\u8bbe\u7f6e\u65f6\u95f4\u5230\u4e00\u4e2a\u65f6\u95f4\u70b9\uff0c\u53ef\u80fd\u4e0e\u5f53\u524d\u7f51\u7edc\u7684\u65f6\u95f4\u6709\u8bef\u5dee\u3002\u4e0b\u9762\u4ecb\u7ecd\u4e00\u4e0b\u4e0e\u65f6\u95f4\u670d\u52a1\u5668\u4e0a\u7684\u65f6\u95f4\u540c\u6b65\u7684\u65b9\u6cd5<\/span>\r\n<\/code><\/pre>\n
    \n
  1. \u5b89\u88c5ntpdate\u5de5\u5177<\/li>\n<\/ol>\n
    yum -y install ntp <\/span>ntpdate\r\n<\/code><\/pre>\n
      \n
    1. \u8bbe\u7f6e\u7cfb\u7edf\u65f6\u95f4\u4e0e\u7f51\u7edc\u65f6\u95f4\u540c\u6b65<\/li>\n<\/ol>\n
      ntpdate cn.pool<\/span>.ntp<\/span>.org<\/span>\r\n\r\nor =>   ntpdate -u ntp.api<\/span>.bz<\/span>\r\n<\/code><\/pre>\n
        \n
      1. \u5c06\u7cfb\u7edf\u65f6\u95f4\u5199\u5165\u786c\u4ef6\u65f6\u95f4<\/li>\n<\/ol>\n
        hwclock<\/span> \u2013<\/span>w\r\n<\/code><\/pre>\n

        4.\u67e5\u770b\u786c\u4ef6\u65f6<\/p>\n

        hwclock -show<\/span><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"

        Linux\u7684\u65f6\u95f4\u5206\u4e3aSystem Clock\uff08\u7cfb\u7edf\u65f6\u95f4\uff09\u548cReal Time Clock \uff08\u786c\u4ef6\u65f6\u95f4\uff0c\u7b80\u79f0RT […]<\/p>\n","protected":false},"author":1476,"featured_media":98015,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-151567","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/151567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1476"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=151567"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/151567\/revisions"}],"predecessor-version":[{"id":151640,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/151567\/revisions\/151640"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/98015"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=151567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=151567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=151567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}