NTP客户端的设置

LINUX做为客户端自动同步时间

如果想定时进行时间校准,可以使用crond服务来定时执行。

编辑 /etc/crontab 文件

加入下面一行:

30 8 * * * root /usr/sbin/ntpdate 192.168.0.1; /sbin/hwclock -w #192.168.0.1是NTP服务器的IP地址

然后重启crond服务service crond restart 这样,每天 8:30 Linux 系统就会自动的进行网络时间校准。

WINDOWS 需要打开windows time服务和RPC的二个服务如果在打开windows time 服务,时报 错误1058,进行下面操作

1.运行 cmd 进入命令行,然后键入

w32tm /register 进行注册

正确的响应为:W32Time 成功注册。

2.如果上一步正确,用 net start “windows time” 或 net start w32time 启动服务。