우분투 18.04 LTS NTP 클라이언트 설정
우분투 18.04 LTS NTP 클라이언트 설정
2020년 2월 12일
우분투 18.04 LTS에 NTP를 설치하여 시간을 동기화합니다.
NTP 설치
$ sudo apt install ntpNTP 설정
사용할 서버를 선택합니다.
pool.ntp.org의 NTP 서버를 사용하겠습니다. 한국 pool: https://www.ntppool.org/zone/kr
1.kr.pool.ntp.org
1.asia.pool.ntp.org
0.asia.pool.ntp.orgNTP 설정을 변경합니다.
$ sudo nano /etc/ntp.conf# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
# Use Ubuntu's ntp server as a fallback.
pool ntp.ubuntu.com미리 설정되어 있던 서버들을 주석 처리한 뒤 선택한 서버의 주소를 입력합니다.
# Specify one or more NTP servers.
server 1.kr.pool.ntp.org
server 1.asia.pool.ntp.org
server 0.asia.pool.ntp.org
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
#pool 0.ubuntu.pool.ntp.org iburst
#pool 1.ubuntu.pool.ntp.org iburst
#pool 2.ubuntu.pool.ntp.org iburst
#pool 3.ubuntu.pool.ntp.org iburst
# Use Ubuntu's ntp server as a fallback.
#pool ntp.ubuntu.comCtrl + X – Y – Enter 하여 저장합니다.
NTP 서비스를 재시작합니다.
$ sudo service ntp restart동기화 확인
$ sudo ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
+ec2-13-124-227- 131.130.251.107 2 u 31 64 37 12.167 0.067 3.915
time.cloudflare 10.51.8.5 3 u 297 64 20 34.039 -7.609 0.000
*send.mx.cdnetwo 216.239.35.8 2 u 32 64 37 3.745 3.930 3.948첫 번째 column이 ‘*‘인 서버가 현재 동기화 중인 서버입니다.