{"id":43,"date":"2011-09-24T23:14:00","date_gmt":"2011-09-24T14:14:00","guid":{"rendered":"http:\/\/yokensaka.com\/centos\/?p=43"},"modified":"2014-12-22T12:26:55","modified_gmt":"2014-12-22T03:26:55","slug":"ntp%e3%82%b5%e3%83%bc%e3%83%90ntp","status":"publish","type":"post","link":"http:\/\/yokensaka.com\/centos\/?p=43","title":{"rendered":"NTP\u30b5\u30fc\u30d0(ntp)"},"content":{"rendered":"<p>\u3053\u3053\u3067\u306f\u3001\u81ea\u30b5\u30fc\u30d0\u3092NTP\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u7acb\u3061\u4e0a\u3052\u3066\u3001\u30b7\u30b9\u30c6\u30e0\u6642\u523b\u3092\u65e5\u672c\u6a19\u6e96\u6642\u9593\u306b\u5408\u308f\u305b\u308b\u3002\u81ea\u30b5\u30fc\u30d0\u306f\u3001\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306eNTP\u30b5\u30fc\u30d0\u3088\u308a\u6642\u523b\u3092\u540c\u671f\u3057\u3066\u3001LAN\u5185\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3001\u30eb\u30fc\u30bf\u30fc\u3092\u81ea\u30b5\u30fc\u30d0\u306e\u6642\u523b\u3068\u540c\u671f\u3055\u305b\u308b\u3088\u3046\u306b\u3059\u308b\u3002<br \/>\n\u203bCentos7\u304b\u3089\u306fchrony\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3068\u306a\u3063\u3066\u308b\u306e\u3067<a href=\"http:\/\/yokensaka.com\/centos\/?p=321\" title=\"Centos7 chrony\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\">\u3053\u3061\u3089\u3092\u53c2\u7167<\/a>\u3002<br \/>\n<b>\u25a0NTP \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3002<\/b><\/p>\n<pre>\r\n[root@server1 ~]# rpm -q ntp\r\nntp-4.2.4p8-2.el6.i686\u3000\u3000\u2190\u3000\u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u305f\r\n\u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u306a\u3051\u308c\u3070NTP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002\r\n[root@server1~]# yum -y install ntp\r\n<\/pre>\n<p><b>\u25a0NTP\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a<\/b><\/p>\n<pre>\r\n\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u5909\u66f4\u3059\u308b\u3002\r\n[root@server1 ~]# mv \/etc\/ntp.conf \/etc\/ntp.conf.org\r\nNTP\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\r\n[root@server1 ~]# vi \/etc\/ntp.conf\r\ndriftfile \/var\/lib\/ntp\/drift\r\nserver ntp1.plala.or.jp\u3000\u3000\u2190\u3000server \u306b\u306f\u3001\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306eNTP\u30b5\u30fc\u30d0\u30fc\u3092\u6307\u5b9a\r\nserver ntp2.plala.or.jp\u3000\u3000\u2190\u3000\u30bb\u30ab\u30f3\u30c0\u30ea\u306eNTP\u30b5\u30fc\u30d0\u30fc\u3082\u6307\u5b9a\u3057\u3066\u304a\u304f\r\n<\/pre>\n<p>\u6642\u523b\u540c\u671f\u5148\u306e\u516c\u958bNTP\u30b5\u30fc\u30d0\u30fc\u3092\u8abf\u3079\u308b\u306b\u306f\u3001<a href=\"http:\/\/wiki.nothing.sh\/page\/NTP\/%A5%D7%A5%ED%A5%D0%A5%A4%A5%C0%A1%A6%B5%A1%B4%D8%CA%CC\" target=\"_blank\">NTP\/\u30d7\u30ed\u30d0\u30a4\u30c0\u30fb\u6a5f\u95a2\u5225\u4e00\u89a7<\/a>\u3092\u53c2\u7167<br \/>\n\u5229\u7528\u3057\u3066\u3044\u308bISP\u304c\u3053\u3053\u306b\u7121\u3044\u6642\u306f\u3001<a href=\"http:\/\/wiki.nothing.sh\/page\/NTP\/%BF%E4%BE%A9%B8%F8%B3%AB%A5%B5%A1%BC%A5%D0\" target=\"_blank\">\u63a8\u5968\u516c\u958b\u30b5\u30fc\u30d0<\/a>\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u3059\u308b\u3002<br \/>\n<b>\u25a0NTP\u30b5\u30fc\u30d0\u30fc\u306e\u8d77\u52d5<\/b><\/p>\n<pre>\r\n\u3044\u3063\u305f\u3093\u3001\u624b\u52d5\u3067NTP\u30b5\u30fc\u30d0\u306e\u6642\u523b\u3068\u540c\u671f\u3055\u305b\u308b\u3002\r\n[root@server1 ~]# ntpdate ntp1.plala.or.jp\r\n28 Dec 17:54:35 ntpdate[11526]: step time server 219.164.211.129 offset 37.009733 sec\r\nNTP\u30b5\u30fc\u30d0\u30fc\u306e\u8d77\u52d5\r\n[root@server1 ~]# \/etc\/rc.d\/init.d\/ntpd start\r\nntpd \u3092\u8d77\u52d5\u4e2d:                                             [  OK  ]<\/pre>\n<p><b>\u25a0NTP\u30b5\u30fc\u30d0\u30fc\u306e\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<\/b><\/p>\n<pre>\r\n[root@server1 ~]# chkconfig ntpd on\r\n[root@server1 ~]# chkconfig --list ntpd\r\nntpd            0:off   1:off   2:on    3:on    4:on    5:on    6:off\r\n\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u30e9\u30f3\u30ec\u30d9\u30eb2\uff5e5\u304c\u30aa\u30f3\u306e\u72b6\u614b\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\r\n<\/pre>\n<p><b>\u25a0NTP\u30b5\u30fc\u30d0\u30fc\u306e\u52d5\u4f5c\u78ba\u8a8d<\/b><\/p>\n<pre>\r\n[root@server1 ~]# ntpq -p\r\nremote           refid      st t when poll reach   delay   offset  jitter\r\n==============================================================================\r\nntp1.plala.or.j 202.234.233.106  4 u   19   64    1    4.774    0.959   0.001\r\nntp2.plala.or.j 202.234.233.109  4 u   18   64    1    6.350    1.529   0.001\r\n\u7d0415\u5206\u5f8c\u3001\u518d\u5ea6NTP\u30b5\u30fc\u30d0\u30fc\u306e\u52d5\u4f5c\u78ba\u8a8d\u3002\r\n[root@server1 ~]# ntpq -p\r\nremote           refid      st t when poll reach   delay   offset  jitter\r\n==============================================================================\r\n+ntp1.plala.or.j 202.234.233.106  4 u   34   64  377    5.131  -21.802  14.379\r\n*ntp2.plala.or.j 202.234.233.109  4 u   38   64  377    8.886  -19.952  13.052\r\n\u6307\u5b9a\u3057\u305fNTP\u30b5\u30fc\u30d0\u306e\u524d\u306b*\u3084+\u304c\u8868\u793a\u3055\u308c\u305f\u6642\u306f\u540c\u671f\u5b8c\u4e86\u306e\u72b6\u614b\u3002\r\n<\/pre>\n<p><b>\u25a0\u6642\u523b\u540c\u671f\u8a2d\u5b9a<\/b><br \/>\n\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306ePC\u3067\u65e5\u4ed8\u3068\u6642\u523b\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u753b\u9762\u3092\u8868\u793a\u3057\u3001\u300c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u6642\u523b\u300d\u30bf\u30d6\u3092\u8868\u793a\u3002 \u30b5\u30fc\u30d0\u306e\u5165\u529b\u6b04\u306b\u81ea\u30b5\u30fc\u30d0\u306eIP\u30a2\u30c9\u30ec\u30b9\u300c192.168.1.2\u300d\u3092\u5165\u529b\u3057\u300c\u4eca\u3059\u3050\u66f4\u65b0\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3002 \u6700\u5f8c\u306b\u300cOK\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001\u4ee5\u964d\u3001\u81ea\u30b5\u30fc\u30d0\u3088\u308a\u6642\u523b\u3092\u540c\u671f\u3059\u308b\u3088\u3046\u306b\u306a\u308b\u3002<br \/>\n\u203b\u30b5\u30fc\u30d0\u30fc\u3067\u30d5\u30a1\u30a4\u30a2\u30fc\u30a6\u30a9\u30fc\u30eb\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u300c\u30d5\u30a1\u30a4\u30a2\u30fc\u30a6\u30a9\u30fc\u30eb\u8a2d\u5b9a\u300d\u3067\u300c\u4ed6\u306e\u30dd\u30fc\u30c8\u300d\u306b\u300c123:udp\u300d\u3092\u8ffd\u8a18\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002\u305d\u3046\u3057\u306a\u3044\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u3067\u540c\u671f\u306b\u5931\u6557\u3059\u308b\u3002\u8a2d\u5b9a\u306e\u65b9\u6cd5\u306fX Window System\u3067\u8d77\u52d5\u3057\u300c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30fb\u30e1\u30cb\u30e5\u30fc\u300d\u304b\u3089\u300c\u30b7\u30b9\u30c6\u30e0\u8a2d\u5b9a\u300d-\u300c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ec\u30d9\u30eb\u300d\u3092\u9078\u629e\u3057\u3066\u300c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ec\u30d9\u30eb\u306e\u8a2d\u5b9a\u30c4\u30fc\u30eb\u300d\u3092\u8d77\u52d5\u3002\u300c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ec\u30d9\u30eb\u300d\u3067\u300c\u30d5\u30a1\u30a4\u30a2\u30a6\u30a9\u30fc\u30eb\u3092\u6709\u52b9\u306b\u3059\u308b\u300d\u3092\u9078\u629e\u3057\u3001\u300c\u4ed6\u306e\u30dd\u30fc\u30c8\u300d\u306b\u300c123:udp\u300d\u3068\u5165\u529b\u3002\u3059\u3067\u306b\u4ed6\u306e\u30dd\u30fc\u30c8\u8a2d\u5b9a\u304c\u8a18\u8ff0\u3055\u308c\u3066\u308b\u5834\u5408\u306f\u3001\u30ab\u30f3\u30de\u8a18\u53f7\uff08,\uff09\u3067\u533a\u5207\u3063\u3066\u65b0\u3057\u3044\u8a2d\u5b9a\u3092\u8ffd\u8a18\u3002<br \/>\n\u3000\u3000<br \/>\n\u30eb\u30fc\u30bf\u306e\u8a2d\u5b9a\u3067NTP\u30b5\u30fc\u30d0\u30fc\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u81ea\u30b5\u30fc\u30d0\u30fc\u306eIP\u30a2\u30c9\u30ec\u30b9\u300c192.168.1.2\u300d\u306b\u5909\u66f4\u3002\u3000\u3000<br \/>\n\u3053\u308c\u3067\u3001\u81ea\u30b5\u30fc\u30d0\u30fc\u3001LAN\u5185\u306eWindows\u30de\u30b7\u30f3\u3001\u30eb\u30fc\u30bf\u30fc\u306e\u6642\u523b\u304c\u5e38\u306b\u540c\u671f\u304c\u53d6\u308c\u3066\u308b\u72b6\u614b\u3067\u65e5\u672c\u6a19\u6e96\u6642\u9593\u3068\u306a\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3053\u3067\u306f\u3001\u81ea\u30b5\u30fc\u30d0\u3092NTP\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u7acb\u3061\u4e0a\u3052\u3066\u3001\u30b7\u30b9\u30c6\u30e0\u6642\u523b\u3092\u65e5\u672c\u6a19\u6e96\u6642\u9593\u306b &hellip; <a href=\"http:\/\/yokensaka.com\/centos\/?p=43\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-ntpntp"],"_links":{"self":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=43"}],"version-history":[{"count":3,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":374,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=\/wp\/v2\/posts\/43\/revisions\/374"}],"wp:attachment":[{"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yokensaka.com\/centos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}