1. yum install -y ntpdate

2. cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

ntpdate us.pool.ntp.org 或
ntpdate time.windows.com

把当前时区调整为上海就是+8区

然后是利用ntpdate同步标准时间

3. 加入定时计划任务,每隔10分钟同步一下时钟

crontab -e
0-59/10 * * * * /usr/sbin/ntpdate us.pool.ntp.org | logger -t NTP

 

相关文章:

  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2021-04-22
  • 2021-12-21
  • 2022-12-23
猜你喜欢
  • 2021-07-18
  • 2022-01-17
  • 2021-11-20
  • 2021-06-26
相关资源
相似解决方案