linux/linux 중급

[linux] ntp 설치 및 운영

jamesku 2017. 11. 6. 01:58

[linux] ntp 설치 및 운영


1. ntp 설치


sudo apt-get install ntpdate


2. 설정


# 부팅과 동시에 실행되게 런레벨 조정

chkconfig ntpd on


# ntp 데몬 시작

service ntpd restart


# ntp 확인

ntpq -dp



3. ntpd 데몬 설정하기


/etc/ntp.conf


driftfile /var/lib/ntp/drift 

#시간 오차를 기록해 보관하는 파일

#ntpd 데몬에 의해 자동생성된다


restric 127.0.01 #sync 제한


server npt 참조할서버 prefer

server npt 참조할서버