查看是否安装ntp包

rpm -qa|grep ntp
suse12搭建ntp服务器

启动ntpd服务查看端口

systemctl enable ntpd
systemctl start ntpd
netstat -nalp|grep 123

suse12搭建ntp服务器

配置文件

/etc/ntp.conf
suse12搭建ntp服务器
suse12搭建ntp服务器
suse12搭建ntp服务器
suse12搭建ntp服务器

查看ntp是否起作用

在local 前面有*表示本地起作用
suse12搭建ntp服务器

客户端连接ntpd

linux连接
ntpdate ntp_server

suse12搭建ntp服务器
windows
suse12搭建ntp服务器

定时任务自动同步

systemctl enable crond
systemctl start crond
crontab -e
* */2 * * * /usr/sbin/ntpdate 192.168.199.100

保存退出,每2小时自动同步

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2021-12-09
猜你喜欢
  • 2021-05-02
  • 2021-09-09
  • 2021-07-23
  • 2022-12-23
  • 2021-04-10
  • 2021-09-17
相关资源
相似解决方案