IT/LINUX

rocky8 ntp 서버 만들기

ssung85 2024. 5. 16. 18:50
728x90

1. 설치

[root@ntp]# dnf install chrony

 

2. config 설정

[root@ntp]# vi /etc/chrony.conf

내용 추가

server time.bora.net iburst

 

728x90

 

3. 서비스 시작

[root@ntp]# systemctl restart chronyd.service
[root@ntp]# systemctl status chronyd.service
● chronyd.service - NTP client/server
   Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2024-05-16 18:43:48 KST; 1s ago
     Docs: man:chronyd(8)
           man:chrony.conf(5)
  Process: 35499 ExecStopPost=/usr/libexec/chrony-helper remove-daemon-state (code=exited, status=0/SUCCESS)
  Process: 35510 ExecStartPost=/usr/libexec/chrony-helper update-daemon (code=exited, status=0/SUCCESS)
  Process: 35504 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 35507 (chronyd)
    Tasks: 1 (limit: 48814)
   Memory: 928.0K
   CGroup: /system.slice/chronyd.service
           └─35507 /usr/sbin/chronyd

 

[root@ntp]# systemctl enable --now chronyd

 

4. 상태확인

[root@ntp]# 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
===============================================================================
^- 121.174.142.81                3   6    17    56  -1725us[-1725us] +/-   43ms
^* 175.193.3.234                 3   6    17    56    -86us[ +364us] +/-   13ms
^? time.bora.net                 2   6    42    52   -206ms[ -206ms] +/- 1090ms

 

 

 

728x90