【Windows】【openEuler】ntpd提供时间源供windows系统同步时间
·
openEuler部署ntpd
安装
yum install ntp -y
配置时间源 /etc/ntp.conf
# 在 /etc/ntp.conf 中增加多台服务器
server ntp.aliyun.com iburst
server time.cloudflare.com iburst
server 0.asia.pool.ntp.org iburst
server 1.asia.pool.ntp.org iburst
重启ntpd
systemctl restart ntpd
查看状态
[root@localhost ~]# ntpstat
synchronised to NTP server (103.186.118.215) at stratum 3
time correct to within 1177 ms
polling server every 64 s
[root@localhost ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
+203.107.6.88 100.107.25.114 2 u 11 64 1 321.188 +147.90 128.231
*2606:4700:f1::1 10.211.8.4 3 u 15 64 1 264.362 -0.328 16.117
+103.186.118.215 216.239.35.8 2 u 15 64 1 327.136 +27.662 120.846
103.83.142.30 .INIT. 16 u - 64 0 0.000 +0.000 0.000
Windows 配置时间同步(一次性)
192.168.1.2为内网ntp服务器地址,开放了udp/123端口
# 一次性执行
w32tm /config /manualpeerlist:"192.168.1.2" /syncfromflags:manual /update
Windows 配置时间同步(同步服务)
powershell
# 配置Windows时间服务
w32tm /config /syncfromflags:manual /manualpeerlist:"192.168.1.2"
w32tm /config /reliable:yes
w32tm /config /update
# 重启时间服务
Stop-Service w32time
Set-Service -Name w32time -StartupType Automatic
Start-Service w32time
# 强制立即同步
w32tm /resync /force
鲲鹏昇腾开发者社区是面向全社会开放的“联接全球计算开发者,聚合华为+生态”的社区,内容涵盖鲲鹏、昇腾资源,帮助开发者快速获取所需的知识、经验、软件、工具、算力,支撑开发者易学、好用、成功,成为核心开发者。
更多推荐
所有评论(0)