본문 바로가기

Linux

linux 시간동기화 ntp, rdate

ntp

 
rdate와 비슷하게 시간동기화해주는 프로토콜. 차이점은 0.001초 단위까지 시간을 맞출 수 있다.
ntp 시간동기화 시, 바로 동기화되는것이 아니고, 설정 서버와 시간을 맞춰가면서 동기화됨.
시간동기화로 설정한 서버와 15분 이상 시간차가 나면, 동기화되지 않는다.
기본 포트번호 UDP 123
 
# yum install ntp.
 
#  vi /etc/ntp.conf
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
 
server kr.pool.ntp.org
server time.bora.net
 
기본 설정되어있는 서버들 주석처리, 국내 ntp 서버로 재등록한다.
 
 
시작프로그램에 서비스 등록
# chkconfig ntpd on
 
 
ntpd 시작
# systemctl start ntpd
 
 
 
즉시 동기화 명령어
# ntpdate -q time.bora.net
# ntpdate -d time.bora.net
 
 
 
 

rdate

 
지정한 서버 시간으로 동기화함.
기본 포트번호 UDP 37

 

rdate -s timeserver  //timeserver에 동기화 할 시간 서버 주소 넣어주면 됨.
 
사용가능한 시간 서버 목록
- time.bora.net
- time.nuri.net
- time.windows.com
- ntp.kornet.net

 

'Linux' 카테고리의 다른 글

apache Http에서 Https로 리다이렉트 설정  (0) 2022.11.06
Apache mpm 확인 / Apache 최적화 및 튜닝  (0) 2022.10.23
php.ini 설정값 정리  (0) 2022.10.23