[NOTE] ClockSynchronize
Ubuntu
- Check your current time-zone:
cat /etc/timezone
- Check if your clock is synchronized with the internet:
timedatectl
1 | root@openstack1:~/kubernetes# timedatectl |
If you haven’t sychronized with internet, the value of System clock synchronize
must be no
Use sudo systemctl restart systemd-timesyncd.service
to activate timesyncd
1 | root@openstack1:~/kubernetes# systemctl status systemd-timesyncd.service |
- The final key to synchronize the clock
sudo timedatectl set-ntp true
- Switch your time-zone
timedatectl list-timezones
to check all the time-zones.
sudo timedatectl set-timezone Asia/Shanghai
CentOS
Using command line
1
2
3
4
5
6
7
8
9installation
yum install chrony
enable chronyd
systemctl start chronyd
systemctl enable chronyd
set timezone to Shanghai
timedatectl set-timezone Asia/Shanghai
launch it
timedatectl set-ntp yes