1 K$ T6 y4 X9 A e在centos7上执行
0 @) }5 g) Y% Z硬件时间默认为UTC:
1 U; W2 h! D" S7 P# g7 b ( K; h5 P3 Z; q. j8 D5 g+ _
timedatectl set-local-rtc 1
. Q& ~% N+ E- o6 t+ F不设置硬件;
- o8 p% [7 N* Q- ^' e, a% Otimedatectl set-local-rtc 0
+ x, z0 U( p# L; g4 p" G N启用NTP时间同步: 1 U( j7 M8 a" Z& p
timedatectl set-ntp yes
- m) b8 [4 U3 W + S1 H& D) L0 M) y3 }; h$ l+ r& H m
timedatectl set-ntptrue
. b. A5 J0 i. W/ w% F3 e) {' x' n* M) I//使用网络时间同步 + _9 z* M( y1 k2 k3 P6 S( n; B
9 u0 n5 d: l( x
1 s. ^9 Y7 D1 e. }7 I强制同步网络ntp服务器时间 2 W: [9 A7 X# p# F% y8 k0 Y
ntpdate -u controller 4 h) n/ a- c$ O# p3 f: o2 Z
|