centos8 时钟同步

  • 加入开启启动
    systemctl enable chronyd

  • 启动chronyd
    systemctl start chronyd

  • 设置时区
    \cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #

  • 设置NTP同步时间
    timedatectl set-ntp true #

  • 修改时间
    date -s “18:00” #
    date -R

  • 重启服务
    systemctl restart chronyd

  • 同步时间
    chronyc sources -v #
    date -R # 查看是否是当前时间
    centos8 时钟同步

  • 加入定时任务
    echo “*/10 * * * * systemctl restart chronyd && chronyc sources -v” >> /var/spool/cron/root

相关文章:

  • 2021-06-26
  • 2022-01-22
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-03
  • 2021-12-07
  • 2021-06-09
  • 2021-12-19
  • 2021-11-30
  • 2021-12-10
相关资源
相似解决方案