作者:蓝眼泪
实验环境: centos7.9、xshell7和vm15。
获取时间服务器的网址Alibaba云
3359 help.a liyun.com/document _ detail/92704.html? SPM=5176.22414175.ss link.57.650674 ff 8o h8nx简要总结
route-niprouteshownetstat-rwatch ' ntpq-p ' ntpdate NTP.a liyun.com 1创建定时任务,定时创建crontab- e */5 * * */usr/sbin
crontab- lntpdatentp.a liyun.comntpdatetime.windows.comntpdatentp.API.bzpkillntpdlsof-I 3360123
安装ntp和ntpdate软件,系统硬件时间或bios时间和yum-installntpntpdatentpdate0. Asia.pool.NTP.org hwclock-- systohc hhh
3时区timezone参数timedatectltimedatectlset-time zone Asia/shanghaitimedatectlset-time zone America/los _ angelestimedate date
4其他信息: AD域中的客户端时间与服务器同步。 #请参照网址
3359 jingyan.Baidu.com/article/20 b 68 a 8860 AC 2d 796 CEC 62b2. html http://blog.Sina.com/s/blog _ b5 dfe 4870102 xxxx
g update/forcenetstopw 32 time net start w32time如果采用系统配备的时间同步功能
1选择“更改日期和时间设置”,显示“日期和时间”对话框,选择“互联网时间”选项卡,然后单击“更改设置”按钮以显示“互联网时间设置”对话框。
2在服务器地址栏中输入国家授时中心服务器的IP地址。 210.72.145.44,单击“立即更新”按钮,同步完成后单击“确定”按钮退出。 好的
修改注册表,提高时间同步的精度
1 .在“开始”菜单“运行”项目中,输入“Regedit”进入注册表编辑器。
2.[ HKEY _ local _ machinesystemcurrent控制集 servicesw32time
Parameters]分支,双击NtpServer将密钥值更改为国家课程中心服务器的IP地址210.72.145.44,然后单击“确定”按钮保存。
3.[ HKEY _ local _ machinesystemcurrent control setservicesw32time
打开TimeProvidersNtpClient]分支,双击SpecialPollInterval键的值,然后在对话框中选择“基数栏”作为“十进制”。 输入框中显示的数字是自动对时的间隔。 例如,缺省值604800设置7 (建议设置时间同步周期,例如900=15分钟或3600=1小时),填写对话框,然后单击(确定)保存并关闭对话框
附件:在中国可能可以使用的NTP时间服务器地址
nist1-ny.glassey.com
utcnist.colorado.edu
time.nist.gov
time-a.nist.gov
time-b.nist.gov
服务器133.100.11.8首选项
服务器210.72.145.44
服务器203.117.180.36
服务器131.107.1.10
服务器时间. Asia.apple.com
服务器64.236.96.53
服务器130.149.17.21
服务器66.92.68.246
server www.freebsd.org
服务器18.145.0.30
server clock.via.net
服务器137.92.140.80
服务器133.100.9.2
服务器128.118.46.3
server ntp.nasa.gov
服务器129.7.1.66
服务器NTP-sop.inria.fr服务器210.72.145.44 (中国国家授权时中心服务器IP地址)。
上海交通大学网络中心NTP服务器地址)。
使用dos命令同步时间参考URL
33559 www.cn blogs.com/MQ 0036/p/8945653.html使用net time命令。 格式如下
net time [ 计算机名称|/domain [ : domain name ]|/RTS domain [ 3360 domain name ] ] [/set ]
net time [computer name ] [/querysntp ]|[/set sntp [ : NTP服务器列表] ]
网络时间/域: DC 01net timeDC 01net time192.168.10.241网络时间 192.168.10.240网络时间192.168.2240