{"id":221,"date":"2015-12-05T00:52:45","date_gmt":"2015-12-04T21:52:45","guid":{"rendered":"http:\/\/meekconsulting.com\/?p=221"},"modified":"2022-01-08T16:26:32","modified_gmt":"2022-01-08T13:26:32","slug":"setting-up-ntp-to-keep-server-time-in-sync","status":"publish","type":"post","link":"https:\/\/meekconsulting.com\/?p=221","title":{"rendered":"Setting up NTP to keep server time in sync"},"content":{"rendered":"<h2>Install ntp packages<\/h2>\n<blockquote><p>yum install ntp<\/p>\n<p>Redhat 5 need ntpdate separately<\/p>\n<p>yum install nptdate<\/p><\/blockquote>\n<h2>Set ntp to start on boot:<\/h2>\n<blockquote><p>chkconfig \u2013level 345 ntp on<\/p>\n<p>chkconfig \u2013level 345 ntpdate on<\/p>\n<p>For redhat 7:<\/p>\n<p>systemctl enable ntpd.service<\/p><\/blockquote>\n<p>Verify with this:<\/p>\n<blockquote><p>chkconfig \u2013list | grep ntp<\/p><\/blockquote>\n<p>Should show on for boot levels 3,4,5<\/p>\n<blockquote><p>chkconfig \u2013list | grep ntp<br \/>\nntpd\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0:off\u00a0\u00a0 1:off\u00a0\u00a0 2:off\u00a0\u00a0 3:on\u00a0\u00a0\u00a0 4:on\u00a0\u00a0\u00a0 5:on\u00a0\u00a0\u00a0 6:off<br \/>\nntpdate\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0:off\u00a0\u00a0 1:off\u00a0\u00a0 2:off\u00a0\u00a0 3:on\u00a0\u00a0\u00a0 4:on\u00a0\u00a0\u00a0 5:on\u00a0\u00a0\u00a0 6:off<\/p><\/blockquote>\n<h2>Edit the config file if you want to use local server<\/h2>\n<p>You can change the servers it uses to sync with to be local domain controllers if you don\u2019t have access to the public NTP servers.<\/p>\n<p>The default settings use round robin pools and send you to random servers in the time server pool.<\/p>\n<p>To change edit the Config File \/etc\/ntp.conf<\/p>\n<p>Change the server lines:<\/p>\n<blockquote><p>server 0.rhel.pool.ntp.org iburst<br \/>\nserver 1.rhel.pool.ntp.org iburst<br \/>\nserver 2.rhel.pool.ntp.org iburst<br \/>\nserver 3.rhel.pool.ntp.org iburst<\/p><\/blockquote>\n<h2>Start the service:<\/h2>\n<blockquote><p>systemctl start\u00a0 ntpd.service<\/p>\n<p>or<\/p>\n<p>service ntpd start<\/p><\/blockquote>\n<h2>Check it is working:<\/h2>\n<p>If it is done right you should be able to see the peers actively being used:<\/p>\n<blockquote><p>ntpq -p<\/p>\n<p>remote\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 refid\u00a0\u00a0\u00a0\u00a0\u00a0 st t when poll reach\u00a0\u00a0 delay\u00a0\u00a0 offset\u00a0 jitter<\/p>\n<p>==============================================================================<\/p>\n<p>+tcgalxdc02.colu 10.1.20.4\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3 u\u00a0\u00a0\u00a0 \u2013\u00a0\u00a0 64\u00a0 377\u00a0\u00a0\u00a0 0.909\u00a0\u00a0 18.481\u00a0 11.071<\/p>\n<p>*tcghqdc04.colum 128.138.141.172\u00a0 2 u\u00a0\u00a0\u00a0 7\u00a0\u00a0 64\u00a0 377\u00a0\u00a0 25.665\u00a0\u00a0 43.190\u00a0 15.213<\/p><\/blockquote>\n<p>If the delay \/ offset \/ jitter are zero \u2014 it means it is not getting to the server\u00a0\u00a0 check the firewall is allowing port 123 traffic for ntp through.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install ntp packages yum install ntp Redhat 5 need ntpdate separately yum install nptdate Set ntp to start on boot: chkconfig \u2013level 345 ntp on chkconfig \u2013level 345 ntpdate on For redhat 7: systemctl enable ntpd.service Verify with this: chkconfig &hellip; <a href=\"https:\/\/meekconsulting.com\/?p=221\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/221"}],"collection":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=221"}],"version-history":[{"count":4,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":226,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/221\/revisions\/226"}],"wp:attachment":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}