linux 时间同步设立

linux 时间同步设置
1. 修改 /etc/sysconfig/clock文件内容为
ZONE=”Asia/Shanghai”
UTC=false
ARC=false

2. 执行下面操作
rm -rf /etc/localtime
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
rdate -s time-nw.nist.gov

如需频繁同步,添加定时任务
3.执行 crontab -e, 加入以下内容。每10分钟同步一次时间, 23:55同步一次
0-59/10 * * * * rdate -s time-nw.nist.gov
55 23 * * * rdate -s time-nw.nist.gov

linux 时间同步设立

相关文章:

你感兴趣的文章:

标签云: