【Centos自动校准时间】centos时间校准

Centos自动校准时间

1.重写clock文件

vim /etc/sysconfig/clock

2.clock文件添加一下内容

ZONE="Asia/Shanghai"
 # 设置为false,硬件时钟不于utc时间一致
UTC=false
ARC=false

3.将时区设置为上海

ln -sf /usr/share/zoneinfo/Asia/Shanghai    /etc/localtime

4.校准时间

# 需要先安装ntp
yum install ntp

# 校准时间
ntpdate asia.pool.ntp.org

5.设置硬件时间和系统时间一致并校准

/sbin/hwclock --systohc

若文章对你有帮助,可以点赞或打赏支持我们。发布者:SmallA,转载请注明出处:http://61.174.243.28:13541/AY-knowledg-hub/%e3%80%90centos%e8%87%aa%e5%8a%a8%e6%a0%a1%e5%87%86%e6%97%b6%e9%97%b4%e3%80%91centos%e6%97%b6%e9%97%b4%e6%a0%a1%e5%87%86/

(0)
SmallA的头像SmallA认证作者
上一篇 2023年 6月 7日 上午10:35
下一篇 2023年 8月 28日 下午2:36

相关推荐

Translate »