본문 바로가기
클라우드/Linux

[Linux] NTP 시간 실시간 동기화 실패 시 해결 방법 / timedatectl (수정)

by cloudgarden 2025. 6. 11.

상황: Linux 서버의 시간을 한국 시간으로 맞추어 두었지만,

시간이 실시간 동기화가 되지 않음

 

 

1. 리눅스 서버의 시스템 시간대(Timezone)를 한국 표준시(Asia/Seoul)로 설정

sudo ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime

 

0. timedatectl

NTP 동기화가 제대로 되지 않음

 

 

1. ping 8.8.8.8

정상 작동

 

 

2. ping google.com

통신 불가 확인

 

 

3. /etc/resolv.conf 에 내용 추가

nameserver 1.1.1.1
nameserver 8.8.8.8

 

: DNS 서버를 지정해서 도메인 이름을 IP 주소로 변환하기 위함!

 

 

4. ping google.com 재시도

통신 확인

 

 

5. /etc/chrony.conf에 내용 추가 

server time.bora.net iburst

 

: chronyd (시간 동기화 서비스) NTP (Network Time Protocol) 서버의 도메인 이름을 사용함

 

6. chronyd enable 시켜주기

systemctl status chronyd
systemctl start chronyd
systemctl enable chronyd
chronyc tracking

 

7. timedatectl

NTP 동기화 확인

 

 

-----------------------------------------------------------

 

상황 2

비슷한 상황인데 얘는 왜 다 nono?

 

위랑 같은 방법으로 해결 완료~

 

 

# SUSE Linux 12 SP 3
systemctl status systemd-timesyncd
systemctl start systemd-timesyncd
systemctl enable systemd-timesyncd

 

 

시간 지나면 NTP synchronized: no → yes 로 바뀜!