[LINUX] CentOS NTP 설정

1. ntp.conf 환경설정

[root@localhost ~]# vi /etc/ntp.conf

(i 키를 눌러 편집모드로 전환)

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict -6 ::1

# Hosts on local network are less restricted.
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap      <= 주석 제거

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org    <= 주석처리
#server 1.centos.pool.ntp.org    <= 주석처리
#server 2.centos.pool.ntp.org    <= 주석처리

server 111.222.111.333         <= 추가 할 NPT 서버


... 이하 생략

:wq  (저장 후 종료)

2. 서비스 시작

[root@localhost ~]# service ntpd restart
Starting ntpd: [  OK  ]

3. 부팅 시 ntpd 데몬이 실행되도록 설정

[root@localhost ~]# chkconfig ntpd on


4. 시간 동기화 확인

[root@localhost ~]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*ntp.postech.ac. .GPS.            1 u   22   64   37    8.006   -1.552  10.856
+mail.funix.net  211.115.194.21   3 u   19   64   37    2.744   -1.836   1.333
 LOCAL(0)        .LOCL.          10 l   17   64   37    0.000    0.000   0.001

댓글

이 블로그의 인기 게시물

[MSSQL] 데이터베이스가 사용 중이어서 배타적으로 액서스할 수 없습니다

[LINUX] CentOS 부팅시 오류 : UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

구글코랩) 안전Dream 실종아동 등 검색 오픈API 소스를 공유합니다. (구글드라이브연동, 이미지 수집 소스)