CentOS 수정 시스템 시간 및 시간 대

Centos 에 nginx 를 배치 할 때 시간 대 문제 가 발생 할 수 있 습 니 다. 시스템 재 부팅 이 끝 난 후에 도 오류 가 발생 할 수 있 습 니 다. so, 아래 NTP 동기 화 상태 로 설정 해 야 합 니 다.
[root@localhost ~]# timedatectl
      Local time: Tue 2019-12-24 16:37:04 CST
  Universal time: Tue 2019-12-24 08:37:04 UTC
        RTC time: Tue 2019-12-24 16:37:04
       Time zone: Asia/Shanghai (CST, +0800)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: yes
      DST active: n/a

date 명령 을 사용 하여 시스템 시간 과 현재 시간 이 일치 하 는 지 확인 합 니 다. 일치 하지 않 으 면 ntp 동기 화 표준 시간 을 사용 해 야 합 니 다. ntp: 네트워크 시간 프로 토 콜 (network time protol)
     설치: yum install ntp
     동기 화: ntpdate pool. ntp. org
다음 세 개가 모두 yes 인지 확인 하고 부족 하면 다음 명령 을 사용 하 십시오.
#      NTP enabled: yes
timedatectl set-ntp on


# NTP synchronized: yes
#           BIOS,       
hwclock -w


#  RTC in local TZ: yes
timedatectl set-local-rtc 1

 

좋은 웹페이지 즐겨찾기