1、查看时间时区

date

2、修改时区

timedatectl set-timezone Asia/Shanghai # 设置系统时区为上海

3、安装ntp 联网校准时间

yum install ntp
systemctl start ntpd
systemctl enable ntpd
ntpdate ntp1.aliyun.com #联网(阿里时间服务器)校准时间

4、配置开机启动校验

vim /etc/rc.d/rc.local
/usr/sbin/ntpdate ntp1.aliyun.com > /dev/null 2>&1; /sbin/hwclock -w

5、配置定时任务

crontab -e
0 */1 * * * ntpdate ntp1.aliyun.com > /dev/null 2>&1; /sbin/hwclock -w

 

相关文章:

  • 2022-03-05
  • 2022-12-23
  • 2021-12-05
  • 2021-07-28
  • 2021-10-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
  • 2021-09-16
  • 2021-12-25
相关资源
相似解决方案