728x90
서버 시간을 활용하는 S/W가 있을 경우 서버 시간 동기화가 설정되어 있지 않을 경우
기능 오류가 발생할 수 있음
Linux Centos 7 ntp 설치 방법
1. Ntp 설치
- $ yum install ntp
2. 동기화할 서버 주소 등록
- $ /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 0.asia.pool.ntp.org
server 1.asia.pool.ntp.org
server 2.kr.pool.ntp.org
3. ntp 서비스를 사용할 수 있도록 방화벽을 설정
- $ firewall-cmd --add-service=ntp --permanent
4. 방화벽을 다시 로드
- $ firewall-cmd --reload
5. ntp 서비스를 시작
- $ systemctl start ntpd
6. 시스템 재부팅 후에도 자동 시작 설정
- $ systemctl enable ntpd
7. 작동 여부 확인
- $ ntpq -p
- $ date
장애 시
해당 현상은 아래 이밎와 같이 localtime에 링크건게 뉴욕 등 다른 나라로 되어 있어서 실패할 수 있습니다.
rm -rf /etc/localtime 을 입력하여 삭제 후 Asia/Seoul로 다시 링크를 걸어주면 시간이 재대로 적용 됩니다.
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime
출처: https://nirsa.tistory.com/255
다른 방법
yum -y install rdate
rdate -s time.bora.net && hwclock -w
728x90
반응형
'컴퓨터 활용(한글, 오피스 등) > 50_2.운영체제_리눅스' 카테고리의 다른 글
리눅스_쉘, 유틸, GRUB2 수정 (0) | 2023.04.10 |
---|---|
리눅스 점검 명령어 (0) | 2023.03.30 |
virt-manager 사용법 (0) | 2022.12.30 |
KVM 가상환경 구축 (0) | 2022.12.25 |
Qemu KVM 가상화 에뮬레이션 차이 (1) | 2022.12.25 |