ntp서버 설치 및 설정 방법
=== 서버쪽 설정 ===
* ntp 서버 설치
# yum install ntp
* 설정파일에 내용 적용
# vi /etc/ntp.conf
restrict 192.168.20.0 mask 255.255.255.0 <==시간동기화 허용 아이피
restrict 127.0.0.1
restrict -6 ::1
# Hosts on local network are less restricted.
#restrict 192.168.1.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 iburst <=== #처리할것
#server 1.centos.pool.ntp.org iburst <=== #처리할것
#server 2.centos.pool.ntp.org iburst <=== #처리할것
#server 3.centos.pool.ntp.org iburst <=== #처리할것
server time.bora.net iburst <====== 가져올 시간서버
* ntp 서버 시작
# /etc/init.d/ntpd start
* 적용 확인
# ntpq -p
remote refid st t when poll reach delay offset jitter
====================================
*time.bora.net 58.224.35.2 3 u 11 64 377 2.138 3.522 17.716
=== 클라쪽 설정 ===
* ntp 서버 설치
# yum install ntp
* 설정파일에 내용 적용
# vi /etc/ntp.conf
restrict 127.0.0.1
restrict ::1 <=====
# Hosts on local network are less restricted.
#restrict 192.168.1.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 iburst <=== #처리할것
#server 1.centos.pool.ntp.org iburst <=== #처리할것
#server 2.centos.pool.ntp.org iburst <=== #처리할것
#server 3.centos.pool.ntp.org iburst <=== #처리할것
server 192.168.20.19 iburst <== ntp 서버 아이피
* ntp 서버 시작
# /etc/init.d/ntpd start
PS) 클라쪽에 설정 마무리하면 몇초 뒤에 자동 동기화됨
사용포트는 udp 123 (방화벽 풀어줄것)