
{"id":566,"date":"2021-09-12T20:02:27","date_gmt":"2021-09-12T12:02:27","guid":{"rendered":"http:\/\/dba.qishuo.xin\/?p=566"},"modified":"2021-09-12T20:03:44","modified_gmt":"2021-09-12T12:03:44","slug":"redhat-linux-7-%e4%bf%ae%e6%94%b9%e6%88%90%e4%b8%ad%e6%96%87%e6%97%b6%e5%8c%ba","status":"publish","type":"post","link":"http:\/\/dba.qishuo.xin\/?p=566","title":{"rendered":"Redhat Linux 7 \u4fee\u6539\u6210\u4e2d\u6587\u65f6\u533a"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-6a14501c56d9d\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a14501c56d9d\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/dba.qishuo.xin\/?p=566\/#1_%E7%B3%BB%E7%BB%9F%E7%8E%AF%E5%A2%83\" >1. \u7cfb\u7edf\u73af\u5883<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/dba.qishuo.xin\/?p=566\/#2_%E5%B0%86%E7%B3%BB%E7%BB%9F%E6%97%B6%E5%8C%BA%E6%94%B9%E4%B8%BA%E4%B8%8A%E6%B5%B7%E6%97%B6%E5%8C%BA%EF%BC%88%E5%8D%B3CST%E6%97%B6%E5%8C%BA%EF%BC%89\" >2. \u5c06\u7cfb\u7edf\u65f6\u533a\u6539\u4e3a\u4e0a\u6d77\u65f6\u533a\uff08\u5373CST\u65f6\u533a\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/dba.qishuo.xin\/?p=566\/#3_%E7%9B%B8%E5%85%B3%E7%9A%84%E5%91%BD%E4%BB%A4\" >3. \u76f8\u5173\u7684\u547d\u4ee4<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"1_%E7%B3%BB%E7%BB%9F%E7%8E%AF%E5%A2%83\"><\/span>1. \u7cfb\u7edf\u73af\u5883<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Oracle Linux Server 7.5<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2_%E5%B0%86%E7%B3%BB%E7%BB%9F%E6%97%B6%E5%8C%BA%E6%94%B9%E4%B8%BA%E4%B8%8A%E6%B5%B7%E6%97%B6%E5%8C%BA%EF%BC%88%E5%8D%B3CST%E6%97%B6%E5%8C%BA%EF%BC%89\"><\/span>2. \u5c06\u7cfb\u7edf\u65f6\u533a\u6539\u4e3a\u4e0a\u6d77\u65f6\u533a\uff08\u5373CST\u65f6\u533a\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-shell line-numbers\">ln -sf \/usr\/share\/zoneinfo\/Asia\/Shanghai \/etc\/localtime\n<\/code><\/pre>\n<pre><code class=\"language-shell line-numbers\">~]# date\nFri Sep 13 12:48:43 EDT 2019\n ~]# time\ntime         timedatectl  timeout      times\n[root@lzudb ~]# timedatectl\n      Local time: Fri 2019-09-13 12:49:04 EDT\n  Universal time: Fri 2019-09-13 16:49:04 UTC\n        RTC time: Fri 2019-09-13 16:49:04\n       Time zone: America\/New_York (EDT, -0400)\n     NTP enabled: yes\nNTP synchronized: yes\n RTC in local TZ: no\n      DST active: yes\n Last DST change: DST began at\n                  Sun 2019-03-10 01:59:59 EST\n                  Sun 2019-03-10 03:00:00 EDT\n Next DST change: DST ends (the clock jumps one hour backwards) at\n                  Sun 2019-11-03 01:59:59 EDT\n                  Sun 2019-11-03 01:00:00 EST\n~]# ln -sf \/usr\/share\/zoneinfo\/Asia\/Shanghai \/etc\/localtime\n~]# date\nSat Sep 14 00:51:02 CST 2019\n~]# date\nSat Sep 14 00:51:06 CST 2019\n~]# timedatectl\n      Local time: Sat 2019-09-14 00:51:47 CST\n  Universal time: Fri 2019-09-13 16:51:47 UTC\n        RTC time: Fri 2019-09-13 16:51:47\n       Time zone: Asia\/Shanghai (CST, +0800)\n     NTP enabled: yes\nNTP synchronized: yes\n RTC in local TZ: no\n      DST active: n\/a\n<\/code><\/pre>\n<p>\u6b64\u65f6\u867d\u7136\u7cfb\u7edf\u65f6\u95f4\u66f4\u65b0\u4e86\uff0c\u4f46\u662f\u65e5\u5fd7\u4e2d\u8bb0\u5f55\u7684\u65f6\u95f4\u8fd8\u662f\u65e7\u65f6\u533a\u65f6\u95f4\uff0c\u6700\u597d\u91cd\u65b0\u542f\u52a8\u4e00\u4e0b\u670d\u52a1\u5668\u3002<br \/>\n\u53e6\u5916\u5728RHEL7\u4e2d\u6709\u547d\u4ee4\uff1atimedatectl<\/p>\n<pre><code class=\"language-shell line-numbers\"># timedatectl list-timezones |grep Shanghai    #\u67e5\u627e\u4e2d\u56fd\u65f6\u533a\u7684\u5b8c\u6574\u540d\u79f0\nAsia\/Shanghai\n# timedatectl set-timezone Asia\/Shanghai    #\u5176\u4ed6\u65f6\u533a\u4ee5\u6b64\u7c7b\u63a8\n<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"3_%E7%9B%B8%E5%85%B3%E7%9A%84%E5%91%BD%E4%BB%A4\"><\/span>3. \u76f8\u5173\u7684\u547d\u4ee4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code class=\"language-shell line-numbers\"># \u67e5\u770b\u65e5\u671f\u65f6\u95f4\u3001\u65f6\u533a\u53ca NTP \u72b6\u6001\ntimedatectl\n\n# \u67e5\u770b\u65f6\u533a\u5217\u8868\ntimedatectl list-timezones\ntimedatectl list-timezones |  grep  -E \"Asia\/S.*\"\n\n# \u4fee\u6539\u65f6\u533a\ntimedatectl set-timezone Asia\/Shanghai\n\n# \u4fee\u6539\u65e5\u671f\u65f6\u95f4\uff08\u53ef\u4ee5\u53ea\u4fee\u6539\u5176\u4e2d\u4e00\u4e2a\uff09\ntimedatectl set-time \"2019-09-19 15:50:20\"\n\n# \u5f00\u542f NTP\ntimedatectl set-ntp true\/flase\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. \u7cfb\u7edf\u73af\u5883 Oracle Linux Serv&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[48,79],"class_list":["post-566","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux","tag-79"],"_links":{"self":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=566"}],"version-history":[{"count":3,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/566\/revisions"}],"predecessor-version":[{"id":569,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/566\/revisions\/569"}],"wp:attachment":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=566"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}