NTP时间服务器同步时间 centos7

1、服务端ios

一、vim /etc/ntp.conf                          进入到ntp的配置文件

二、配置文件所有删除,只要下面三行vim

restrict default nomodify              不容许客户端登陆和修改

            server 127.127.1.0                      使用本地bios时间,本身跟本身同步

    fudge 127.127.1.0 stratum 10     定义级别,越小越精准

2、客户端服务器

一、ntpdate -b 服务器的IP地址              手动时间同步,-b加速初始化

    二、也可加入计划任务中进行自动同步

          crontab -e

          01 * * * * ntpdate 服务器的IP地址
相关文章
相关标签/搜索