内网搭建ntp服务环境

参考链接:https://blog.csdn.net/weixin_30394019/article/details/119659266

1.ntp服务端:

  a.服务端需要安装ntp;

  b.编辑/etc/ntp.conf:

    添加 server 127.127.1.0 prefer

    restrict 客户端1ip 客户端2ip ...

    restrict 网段 netmask 掩码   # 允许网段内的机器同步服务端的时间

  c.启动ntp服务、设置开机自启ntp

    systemctl start ntpd.service

    systemctl enable ntpd.service

2.客户端:

  a.客户端需要安装ntpdate:

    linux命令行可以执行ntpdate 服务器ip  可以手动同步ntp服务器时间

  b.自动同步:

    利用crontab执行定时任务,使用crontab -e进入,编辑

    * * * * * /usr/sbin/netdate 服务器ip        #每分钟同步时间

crontab参考链接:https://blog.csdn.net/qq_26282629/article/details/79014388

posted @   Tom_2020  阅读(189)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
点击右上角即可分享
微信分享提示