Red Hat Enterprise Linux 8부터 NTP 프로토콜은 chronyd 데몬에서 구현되며
chrony 패키지의 리포지토리에서 사용할 수 있습니다.
29장. Chrony 제품군을 사용하여 NTP 구성 Red Hat Enterprise Linux 8 | Red Hat Customer Portal
-- chrony 패키지 설치
[root@~]# yum -y install chrony
-- 상태, 자동 실행, 시작
[root@~]# systemctl status chronyd.service
[root@~]# systemctl start chronyd.service
[root@~]# systemctl enable chronyd.service
-- 환경설정 변경
[root@~]# vi /etc/chrony.conf
#pool 2.rhel.pool.ntp.org iburst
server time.bora.net
server time.kornet.net
server kr.pool.ntp.org
# Asia Server
server 0.asia.pool.ntp.org iburst
server 1.asia.pool.ntp.org iburst
server 2.asia.pool.ntp.org iburst
server 3.asia.pool.ntp.org iburst
-- 하드웨어 장비 시간
[root@~]# hwclock -v
[root@~]# hwclock -w
hwclock from util-linux 2.32.1
System Time: 1718686753.901890
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 0 seconds after 1969
Last calibration done at 0 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2024/06/18 04:59:14
Hw clock time : 2024/06/18 04:59:14 = 1718686754 seconds since 1969
Time since last adjustment is 1718686754 seconds
Calculated Hardware Clock drift is 0.000000 seconds
[참고]
pool.ntp.org: NTP Servers in Asia, asia.pool.ntp.org (ntppool.org)
-- 작동 여부 확인, Reach값이 377이면 동기화 정상 상태
[root@syapp ~]# 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
===============================================================================
^- time.bora.net 3 6 377 62 +45ms[ +45ms] +/- 51ms
^+ send.mx.cdnetworks.com 2 7 377 116 -378us[ -378us] +/- 23ms