xiaoyou2018

配置 Windows 时间服务以使用外部时间源


要将内部时间服务器配置为与外部时间源同步,请使用以下方法之一:

软件自动配置  Windows 时间服务

若要自动修复此问题,请单击“下载”按钮。 在“文件下载”对话框中,选择 “运行” 或“打开”,然后按照 Easy fix 向导中的步骤操作。

运行  Easy fix 解决方案配置外部时间源时,需要指定 NTP 服务器的名称。  Easy fix 解决方案将具有占位符名称 Server1 和 Server2。 将这些占位符名称替换为 NTP 服务器的名称且后跟““,0x1””,即ntp3.aliyun.com,0x1

 

  • SpecialPollIntervalMaxPosPhaseCorrection 和 MaxNegPhaseCorrection 设置的时间单位为秒。
  • 链接:https://pan.baidu.com/s/1fyh-iYcoi6XKOjO3J2jikQ
    提取码:nmcd

    NTP 服务器列表

        • 阿里云授时服务器
          #NTP服务器
          ntp1.aliyun.com
          ntp2.aliyun.com
          ntp3.aliyun.com
          ntp4.aliyun.com
          ntp5.aliyun.com
          ntp6.aliyun.com
          ntp7.aliyun.com
          
          #Time服务器
          time1.aliyun.com
          time2.aliyun.com
          time3.aliyun.com
          time4.aliyun.com
          time5.aliyun.com
          time6.aliyun.com
          time7.aliyun.com
          
          国内大学授时服务器
          
          s1c.time.edu.cn       北京大学 
          s2m.time.edu.cn       北京大学
          s1b.time.edu.cn       清华大学
          s1e.time.edu.cn       清华大学
          s2a.time.edu.cn       清华大学
          s2b.time.edu.cn       清华大学
          ntp.sjtu.edu.cn     上海交通大学 国外授时服务器 #苹果提供的授时服务器 time1.apple.com time2.apple.com time3.apple.com time4.apple.com time5.apple.com time6.apple.com time7.apple.com #Google提供的授时服务器 time1.google.com time2.google.com time3.google.com time4.google.com

           

  • 手动修改  Windows 时间服务

修改默认NTP服务器地址

Windows Server操作系统默认配置微软NTP服务器(time.windows.com),但是可能经常同步出错。您可以将默认NTP服务器更换成阿里云提供的NTP服务器。

按以下步骤修改默认NTP服务器地址:

  1. 在任务栏的通知区域,单击日期和时间,并单击 更改日期和时间设置
  2. 在 日期和时间 对话框里,单击 Internet 时间 选项卡,并单击 更改设置
  3. 在 Internet 时间设置 对话框里,选择 与Internet时间服务器同步,填写一个阿里云NTP服务器地址,并单击 立即更新

 

修改NTP服务时间同步间隔

NTP服务的时间同步间隔默认是5分钟,您可以根据业务需求自定义同步间隔。按以下步骤修改时间同步间隔:

  1. 选择 开始 > 所有程序 > 附件 > 运行,打开 运行 对话框,并运行命令 regedit。
  2. 在 注册表编辑器 的左侧目录树中,找到 HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > services > W32Time > TimeProviders > NtpClient,并双击SpecialPollInterval键值。
  3. 在 编辑 DWORD (32 位)值 对话框中,在 基数 栏里选择 十进制,并按需要填写 数值数据。填入的数值即是您需要的同步时间间隔(单位为秒)。

Linux设置方法

https://www.cnblogs.com/xiaoerlang/p/6576610.html

首先安装NTP:

yum install ntp

修改/etc/ntp.conf

server ntp1.aliyun.com prefer
server ntp2.aliyun.com

手工发起同步:ntpdate ntp1.aliyun.com 
启动NTP服务:service ntpd start 
设置开机启动:chkconfig ntpd on 
检查设置:chkconfig --list ntpd

或者直接使用中国时区 

 

yum -y install ntp ntpdate
systemctl start ntpd
systemctl enable ntpd
ntpdate cn.pool.ntp.org

 

参考:https://help.aliyun.com/document_detail/51890.html

          https://help.aliyun.com/document_detail/92803.html?spm=a2c4g.11186623.2.21.411549eaNJ3FsK

          https://help.aliyun.com/document_detail/92704.html?spm=a2c4g.11186623.2.14.411549eaNJ3FsK#TimeCalibrationNTP

          https://support.microsoft.com/zh-cn/help/816042/how-to-configure-an-authoritative-time-server-in-windows-server

          https://www.jianshu.com/p/28864ab7fdd9

         https://yq.aliyun.com/articles/668836

         https://blog.kelu.org/tech/2018/12/03/ntp-for-centos.html     Linux

 

 

分类:

技术点:

相关文章: