Correct Answer:
# Install the chrony service for configuring NTP server
[root@node1 ~]# yum -y install chrony
[root@node1 ~]# vim /etc/chrony.conf
server materials.example.com iburst
[root@node1 ~]# systemctl restart chronyd
[root@node1 ~]# systemctl enable chronyd
# Check
# Set an arbitrary time
[root@node1 ~]# date -s "1982-1-1"
Fri Jan 1 12:00:00 AM EST 1982
# Restart the NTP server
[root@node1 ~]# systemctl restart chronyd
# Check if the time is synchronized
# Execute after 3-5 seconds, too fast won't synchronize the time
[root@node1 ~]# date
Tue Dec 12 11:40:19 PM EST 2023
# Use the chronyc command to check synchronization status
[root@node1 ~]# chronyc sources -v
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current best, '+' = combined, '-' = not combined,
| / 'x' = may be in error, '~' = too variable, '?' = unusable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
^* classroom.lab.example.com 8 6 17 42 -14us[ -11us] +/- 463us