-
NTP서버 구성(chrony) - Master, ClientOS/centos 2022. 5. 2. 13:28
NTP Server Master : 192.168.72.11
=========================================
=========================================
[NTP서버 MASTER]
chrony 설치되어있는지 확인
rpm -qa | grep chrony
=========================================
timezone 확인
timedatectl status
Time zone: 확인하여 Asia/Seoul이 아니면 아래 명령어 실행
timedatectl set-timezone Asia/Seoul
=========================================
vi /etc/chrony.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 3.kr.pool.ntp.org
server 2.asia.pool.ntp.org
server 0.asia.pool.net.org시간동기화 진행할 대역
allow 192.168.72.0/24
=========================================
서비스 재시작
systemctl restart chronyd
systemctl enable chronyd
=========================================
확인명령어
시간동기화를 위한 원격지 서버 상태 확인
chronyc tracking**Reference ID : 시간 동기화를 위한 원격지 서버 IP 또는 도메인
크로니 동기화 하는 네트워크
chronyc sources**동기화 소스 MS 상태
^ : 서버
= : 피어
# : 로컬
* : 사용중
+ : 사용중인 소스와 결합 가능
- : 사용중인 소스와 결합하지 않음
? : 연결 불능
x : 연결 불가
상태확인
timedatectl status
**시간 동기화에 약간의 시간이 걸릴 수 있습니다.5~10분간 기다려줍니다. 그래도 동기화가 되지 않는다면, 시간 정보 확인 필요
NTP synchronized: yes
아니라면, 다음 명령어 실행(실행 후 5~10분간 기다려줍니다.)
timedatectl set-ntp yes
그래도 동기화가 되지 않는다면, 다음 명령어 실행(실행 후 5~10분 간 기다려줍니다.)
chronyc –a makestep
=========================================
=========================================
[CLIENT]
chrony 설치되어있는지 확인
rpm -qa | grep chronytimezone 확인
timedatectl status
Time zone: 확인하여 Asia/Seoul이 아니면 아래 명령어 실행
timedatectl set-timezone Asia/Seoul
=========================================
vi /etc/chrony.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
추가
#ntp-server
server 192.168.72.11
=========================================
systemctl restart chronyd
systemctl enable chronydchronyc tracking
timedatectl status
chronyc sources
** 제 테스트환경에서는 client쪽에서 ntp서버와 시간동기화하는데에 시간이 걸렸음.
'OS > centos' 카테고리의 다른 글
ssh 비밀번호 없이 접속하기 (0) 2022.11.04 HAproxy - Keepalived - Apache 설정(수정중) (0) 2022.05.12 CentOS7 기본설정 - VirtualBox (0) 2022.04.06 CentOS7 - NFS 연동 (0) 2022.04.06 CentOS7 - Repository 서버 만들기 - 기타 여러가지 추가 (0) 2022.04.06