{"id":584,"date":"2018-02-01T09:17:15","date_gmt":"2018-02-01T01:17:15","guid":{"rendered":"https:\/\/blog.jsjs.org\/?p=584"},"modified":"2018-02-01T09:17:15","modified_gmt":"2018-02-01T01:17:15","slug":"rhel7-how-to-set-up-the-ntp-service","status":"publish","type":"post","link":"https:\/\/blog.jsjs.org\/?p=584","title":{"rendered":"RHEL7: How to set up the NTP service."},"content":{"rendered":"<p>Note: This is an\u00a0<a href=\"https:\/\/www.certdepot.net\/rhel7-rhcsa-exam-objectives\/\">RHCSA 7 exam objective<\/a>\u00a0and an\u00a0<a href=\"https:\/\/www.certdepot.net\/rhel7-rhce-exam-objectives\/\">RHCE 7 exam objective<\/a>.<\/p>\n<h2>Presentation<\/h2>\n<p><strong>NTP<\/strong>\u00a0(<strong>N<\/strong>etwork\u00a0<strong>T<\/strong>ime\u00a0<strong>P<\/strong>rotocol) is a protocol to keep servers time synchronized: one or several master servers provide time to client servers that can themselves provide time to other client servers (notion of stratus).<\/p>\n<p>This tutorial deals with client side configuration, even though server configuration is not entirely different.<\/p>\n<p>Two main packages are used in\u00a0<strong>RHEL 7<\/strong>\u00a0to set up the client side:<\/p>\n<ul>\n<li><strong>ntp<\/strong>: this is the classic package, already existing in\u00a0<strong>RHEL 6<\/strong>,\u00a0<strong>RHEL 5<\/strong>, etc. It can be used both as a\u00a0<strong>NTP<\/strong>\u00a0client or server.<\/li>\n<li><strong>chrony<\/strong>: this is a new solution better suited for portable PC or machines with network connection problems (time synchronization is quicker). It can only be used as a\u00a0<strong>NTP<\/strong>client.\u00a0<strong>chrony<\/strong>\u00a0is the default package in\u00a0<strong>RHEL 7<\/strong>.<\/li>\n<\/ul>\n<p><strong>Caution<\/strong>:\u00a0<strong>ntpd<\/strong>\u00a0and\u00a0<strong>chronyd<\/strong>\u00a0shouldn\u2019t run at the same time. Choose one and only one of them! There are reports from\u00a0<strong>RHCE<\/strong>\u00a0candidates noting that one of them is purposely already running at the beginning of the exam.<\/p>\n<h2>Prerequisites<\/h2>\n<p>Before anything else, you need to assign the correct time zone.<br \/>\nTo get the current configuration, type:<\/p>\n<pre># <strong>timedatectl<\/strong>\nLocal time: Sat 2015-11-07 08:17:33 EST\nUniversal time: Sat 2015-11-07 13:17:33 UTC\nRTC time: Sat 2015-11-07 13:17:33\nTimezone: <strong>America\/New_York (EST, -0500)<\/strong>\nNTP enabled: yes\nNTP synchronized: yes\nRTC in local TZ: no\nDST active: no\nLast DST change: DST ended at\nSun 2015-11-01 01:59:59 EDT\nSun 2015-11-01 01:00:00 EST\nNext DST change: DST begins (the clock jumps one hour forward) at\nSun 2016-03-13 01:59:59 EST\nSun 2016-03-13 03:00:00 EDT<\/pre>\n<p>To get the list of all the available time zones, type:<\/p>\n<pre># <strong>timedatectl list-timezones<\/strong>\nAfrica\/Abidjan\nAfrica\/Accra\nAfrica\/Addis_Ababa\n...\nAmerica\/La_Paz\nAmerica\/Lima\nAmerica\/Los_Angeles\n...\nAsia\/Seoul\nAsia\/Shanghai\nAsia\/Singapore\n...\nPacific\/Tongatapu\nPacific\/Wake\nPacific\/Wallis\n<\/pre>\n<p>Finally, to set a specific time zone (here\u00a0<strong>America\/Los_Angeles<\/strong>), type:<\/p>\n<pre># <strong>timedatectl set-timezone America\/Los_Angeles<\/strong><\/pre>\n<p>Then, to check your new configuration, type:<\/p>\n<pre># <strong>timedatectl<\/strong>\n      Local time: Sat 2015-11-07 05:32:43 PST\n  Universal time: Sat 2015-11-07 13:32:43 UTC\n        RTC time: Sat 2015-11-07 13:32:43\n        Timezone: <strong>America\/Los_Angeles (PST, -0800)<\/strong>\n     NTP enabled: yes\nNTP synchronized: yes\n RTC in local TZ: no\n      DST active: no\n Last DST change: DST ended at\n                  Sun 2015-11-01 01:59:59 PDT\n                  Sun 2015-11-01 01:00:00 PST\n Next DST change: DST begins (the clock jumps one hour forward) at\n                  Sun 2016-03-13 01:59:59 PST\n                  Sun 2016-03-13 03:00:00 PDT\n<\/pre>\n<h2>The NTP Package<\/h2>\n<p>Install the\u00a0<strong>NTP<\/strong>\u00a0package:<\/p>\n<pre># <strong>yum install -y ntp<\/strong><\/pre>\n<p>Activate the\u00a0<strong>NTP<\/strong>\u00a0service at boot:<\/p>\n<pre># <strong>systemctl enable ntpd<\/strong><\/pre>\n<p>Start the\u00a0<strong>NTP<\/strong>\u00a0service:<\/p>\n<pre># <strong>systemctl start ntpd<\/strong><\/pre>\n<p>The\u00a0<strong>NTP<\/strong>\u00a0configuration is in the\u00a0<strong>\/etc\/ntp.conf<\/strong>\u00a0file:<\/p>\n<pre># For more information about this file, see the man pages\n# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).\n\ndriftfile \/var\/lib\/ntp\/drift\n\n# Permit time synchronization with our time source, but do not\n# permit the source to query or modify the service on this system.\nrestrict default nomodify notrap nopeer noquery\n\n# Permit all access over the loopback interface.  This could\n# be tightened as well, but to do so would effect some of\n# the administrative functions.\nrestrict 127.0.0.1\nrestrict ::1\n\n# Use public servers from the pool.ntp.org project.\n# Please consider joining the pool (http:\/\/www.pool.ntp.org\/join.html).\n<strong>server 0.centos.pool.ntp.org iburst\nserver 1.centos.pool.ntp.org iburst\nserver 2.centos.pool.ntp.org iburst\nserver 3.centos.pool.ntp.org iburst\n<\/strong>\nincludefile \/etc\/ntp\/crypto\/pw\n\n# Key file containing the keys and key identifiers used when operating\n# with symmetric key cryptography.\nkeys \/etc\/ntp\/keys\n<\/pre>\n<p>Note: For basic configuration purpose, only the\u00a0<strong>server<\/strong>\u00a0directives could need a change to point at a different set of master time servers than the defaults specified.<\/p>\n<p>To get some information about the time synchronization process, type:<\/p>\n<pre># <strong>ntpq -p<\/strong>\n     remote           refid      st t when poll reach   delay   offset  jitter\n==============================================================================\n*y.ns.gin.ntt.ne 192.93.2.20      2 u   47   64  377   27.136    6.958  11.322\n+ns1.univ-montp3 192.93.2.20      2 u   45   64  377   34.836   -0.009  11.463\n+merlin.ensma.ne 193.204.114.232  2 u   48   64  377   34.586    4.443  11.370\n+obsidian.ad-not 131.188.3.220    2 u   50   64  377   22.548    4.256  12.077\n<\/pre>\n<p><strong>Alternatively<\/strong>, to\u00a0get a basic report, type:<\/p>\n<pre># <strong>ntpstat<\/strong>\nsynchronised to NTP server (129.250.35.251) at stratum 3\ntime correct to within 60 ms\npolling server every 64 s<\/pre>\n<p>To quickly synchronize a server, type:<\/p>\n<pre># <strong>systemctl stop ntpd<\/strong>\n# <strong>ntpdate pool.ntp.org<\/strong>\n 5 Jul 10:36:58 ntpdate[2190]: adjust time server 95.81.173.74 offset -0.005354 sec\n# <strong>systemctl start ntpd<\/strong><\/pre>\n<h2>The Chrony Package<\/h2>\n<p><strong>Alternatively<\/strong>, you can install the new<strong>\u00a0Chrony<\/strong>\u00a0service that is quicker to synchronize clocks in mobile and virtual systems.<\/p>\n<p>Install the\u00a0<strong>Chrony<\/strong>\u00a0service:<\/p>\n<pre># <strong>yum install -y chrony<\/strong><\/pre>\n<p>Activate the\u00a0<strong>Chrony<\/strong>\u00a0service at boot:<\/p>\n<pre># <strong>systemctl enable chronyd<\/strong><\/pre>\n<p>Start the\u00a0<strong>Chrony<\/strong>\u00a0service:<\/p>\n<pre># <strong>systemctl start chronyd<\/strong><\/pre>\n<p>The\u00a0<strong>Chrony<\/strong>\u00a0configuration is in the\u00a0<strong>\/etc\/chrony.conf<\/strong>\u00a0file:<\/p>\n<pre># Use public servers from the pool.ntp.org project.\n# Please consider joining the pool (http:\/\/www.pool.ntp.org\/join.html).\n<strong>server 0.centos.pool.ntp.org iburst\nserver 1.centos.pool.ntp.org iburst\nserver 2.centos.pool.ntp.org iburst\nserver 3.centos.pool.ntp.org iburst\n<\/strong>\n# Ignore stratum in source selection.\nstratumweight 0\n\n# Record the rate at which the system clock gains\/losses time.\ndriftfile \/var\/lib\/chrony\/drift\n\n# Enable kernel RTC synchronization.\nrtcsync\n\n# In first three updates step the system clock instead of slew\n# if the adjustment is larger than 10 seconds.\nmakestep 10 3\n\n# Listen for commands only on localhost.\nbindcmdaddress 127.0.0.1\nbindcmdaddress ::1\n\nkeyfile \/etc\/chrony.keys\n\n# Specify the key used as password for chronyc.\ncommandkey 1\n\n# Generate command key if missing.\ngeneratecommandkey\n\n# Disable logging of client accesses.\nnoclientlog\n\n# Send a message to syslog if a clock adjustment is larger than 0.5 seconds.\nlogchange 0.5\n\nlogdir \/var\/log\/chrony\n<\/pre>\n<p>Note: For basic configuration purpose, only the\u00a0<strong>server<\/strong>\u00a0directives could need a change to point at a different set of master time servers than the defaults specified.<\/p>\n<p>To get information about the main time reference, type:<\/p>\n<pre># <strong>chronyc tracking<\/strong>\nReference ID    : 94.23.44.157 (merzhin.deuza.net)\nStratum         : 3\nRef time (UTC)  : Thu Jul  3 22:26:27 2014\nSystem time     : 0.000265665 seconds fast of NTP time\nLast offset     : 0.000599796 seconds\nRMS offset      : 3619.895751953 seconds\nFrequency       : 0.070 ppm slow\nResidual freq   : 0.012 ppm\nSkew            : 0.164 ppm\nRoot delay      : 0.030609 seconds\nRoot dispersion : 0.005556 seconds\nUpdate interval : 1026.9 seconds\nLeap status     : Normal\n<\/pre>\n<p>To get equivalent information to the\u00a0<strong>ntpq<\/strong>\u00a0command, type:<\/p>\n<pre># <strong>chronyc sources -v<\/strong>\n210 Number of sources = 4\n\n\u00a0 .-- Source mode\u00a0 '^' = server, '=' = peer, '#' = local clock.\n\u00a0\/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,\n| \/\u00a0\u00a0 '?' = unreachable, 'x' = time may be in error, '~' = time too variable.\n||\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 .- xxxx [ yyyy ] +\/- zzzz\n||\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\u00a0\u00a0 xxxx = adjusted offset,\n||\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Log2(Polling interval) -.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0 yyyy = measured offset,\n||\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \\\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0 zzzz = estimated error.\n||\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\nMS Name\/IP address\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Stratum Poll Reach LastRx Last sample\n===============================================================================\n^+ merlin.ensma.fr\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2\u00a0\u00a0 6\u00a0\u00a0\u00a0 77\u00a0\u00a0\u00a0 61\u00a0\u00a0 +295us[+1028us] +\/-\u00a0\u00a0 69ms\n^* lafkor.de\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2\u00a0\u00a0 6\u00a0\u00a0\u00a0 77\u00a0\u00a0\u00a0 61\u00a0 -1371us[ -638us] +\/-\u00a0\u00a0 65ms\n^+ kimsuflol.iroqwa.org\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3\u00a0\u00a0 6\u00a0\u00a0\u00a0 77\u00a0\u00a0\u00a0 61\u00a0\u00a0 -240us[ -240us] +\/-\u00a0\u00a0 92ms\n^+ merzhin.deuza.net\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2\u00a0\u00a0 6\u00a0\u00a0\u00a0 77\u00a0\u00a0\u00a0 61\u00a0\u00a0\u00a0 +52us[\u00a0 +52us] +\/-\u00a0\u00a0 48ms\n\n# <strong>chronyc sourcestats -v<\/strong>\n210 Number of sources = 4\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 .- Number of sample points in measurement set.\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\u00a0\u00a0\u00a0 .- Number of residual runs with same sign.\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0 \/\u00a0\u00a0\u00a0 .- Length of measurement set (time).\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0 |\u00a0\u00a0\u00a0 \/\u00a0\u00a0\u00a0\u00a0\u00a0 .- Est. clock freq error (ppm).\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0 |\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0 \/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 .- Est. error in freq.\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0 |\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 .- Est. offset.\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0 |\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0 On the -.\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0 |\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0 samples. \\\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0 |\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\nName\/IP Address\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NP\u00a0 NR\u00a0 Span\u00a0 Frequency\u00a0 Freq Skew\u00a0 Offset\u00a0 Std Dev\n==============================================================================\nmerlin.ensma.fr\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 7\u00a0\u00a0 5\u00a0\u00a0 200\u00a0\u00a0\u00a0\u00a0\u00a0 0.106\u00a0\u00a0\u00a0\u00a0\u00a0 6.541\u00a0\u00a0 +381us\u00a0\u00a0 176us\nlafkor.de\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 7\u00a0\u00a0 4\u00a0\u00a0 199\u00a0\u00a0\u00a0\u00a0\u00a0 0.143\u00a0\u00a0\u00a0\u00a0 10.145\u00a0\u00a0 -916us\u00a0\u00a0 290us\nkimsuflol.iroqwa.org\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 7\u00a0\u00a0 7\u00a0\u00a0 200\u00a0\u00a0\u00a0\u00a0 -0.298\u00a0\u00a0\u00a0\u00a0\u00a0 6.717\u00a0\u00a0\u00a0 +69us\u00a0\u00a0 184us\nmerzhin.deuza.net\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 7\u00a0\u00a0 5\u00a0\u00a0 200\u00a0\u00a0\u00a0\u00a0\u00a0 0.585\u00a0\u00a0\u00a0\u00a0 11.293\u00a0\u00a0 +675us\u00a0\u00a0 314us\n<\/pre>\n<p>To quickly synchronize a server, type:<\/p>\n<pre># <strong>ntpdate pool.ntp.org<\/strong>\n 5 Jul 10:31:06 ntpdate[2135]: step time server 193.55.167.1 offset 121873.493146 sec\n<\/pre>\n<p>Note: You don\u2019t need to stop the\u00a0<strong>Chrony<\/strong>\u00a0service to synchronize the server.<\/p>\n<h2>Additional Resources<\/h2>\n<p>You can read these\u00a0<strong>Red Hat<\/strong>\u00a0articles about\u00a0<a href=\"http:\/\/developers.redhat.com\/blog\/2015\/06\/01\/five-different-ways-handle-leap-seconds-ntp\/\">leap seconds management<\/a>, how to\u00a0<a href=\"https:\/\/access.redhat.com\/articles\/15145\">resolve leap second issues<\/a>\u00a0or the\u00a0<a href=\"http:\/\/rhelblog.redhat.com\/2016\/07\/20\/combining-ptp-with-ntp-to-get-the-best-of-both-worlds\/\">differences between NTP and\u00a0PTP<\/a>.<br \/>\nThe\u00a0<strong>xmodulo website<\/strong>\u00a0provides a tutorial on\u00a0<a title=\"How to set up NTP server in CentOS\" href=\"http:\/\/xmodulo.com\/setup-ntp-server-centos.html\">How to set up NTP server in CentOS<\/a>.<br \/>\nDocumentation about\u00a0<strong>NTP<\/strong>\u00a0is available at the\u00a0<a href=\"http:\/\/doc.ntp.org\/\">NTP Documentation Archive website<\/a>\u00a0and at the\u00a0<a href=\"http:\/\/chrony.tuxfamily.org\/\">Tuxfamily website<\/a>\u00a0for\u00a0<strong>Chrony<\/strong>.<\/p>\n<p>Beyond the exam objectives, virtualization can trigger problems (see\u00a0<a href=\"http:\/\/serverfault.com\/questions\/703702\/ntp-service-stopped-in-centos7-1-linux-machine\">this thread<\/a>) and it is useful to know\u00a0<a href=\"https:\/\/www.redhat.com\/en\/about\/blog\/avoiding-clock-drift-vms\">How to avoid VM clock drift<\/a>.<\/p>\n<p>You can also be interested in\u00a0<a href=\"https:\/\/developers.redhat.com\/blog\/2017\/02\/22\/how-to-build-a-stratum-1-ntp-server-using-a-raspberry-pi\/\">converting a Raspberry PI into a stratum 1 NTP server<\/a>.<\/p>\n<p>Some specific services can need to wait until the clock is synchronized: read this\u00a0<a href=\"https:\/\/www.spinics.net\/lists\/centos\/msg165544.html\">thread<\/a>\u00a0to know how to configure them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note: This is an\u00a0RHCSA 7 exam objective\u00a0and an\u00a0RHCE 7 exam objective. Presentation NTP\u00a0(Network\u00a0Time\u00a0Protocol) is a protocol to keep servers time [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-584","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=584"}],"version-history":[{"count":0,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/584\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}