上传到ftp网站模板,关键词排名什么意思,行业网站开发运营方案,公司网站主页排版时间服务器配置#xff1a; 1 安装软件包: [rootlocalhost ~]# yum install ntp –y 2 修改配置文件 [rootlocalhost ~]# vim /etc/ntp.conf # 允许内网其他机器同步时间 192.168.1.0该网段 restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap 允许任何ip的客户机都可以…时间服务器配置 1 安装软件包: [rootlocalhost ~]# yum install ntp –y 2 修改配置文件 [rootlocalhost ~]# vim /etc/ntp.conf # 允许内网其他机器同步时间 192.168.1.0该网段 restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap 允许任何ip的客户机都可以进行时间同步 将restrict default kod nomodify notrap nopeer noquery修改为如下行 Restrict default nomodify 参数主要有以下几个 ignore 关闭所有的 NTP 联机服务 nomodify客户端不能更改服务端的时间参数但是客户端可以通过服务端进行网络校时。 notrust客户端除非通过认证否则该客户端来源将被视为不信任子网 noquery不提供客户端的时间查询 notrap 不提供trap远端登陆拒绝为匹配的主机提供模式 6 控制消息陷阱服务。陷阱服务是 ntpdq 控制消息协议的子系统用于远程事件日志记录程序。 nopeer 用于阻止主机尝试与服务器对等并允许欺诈性服务器控制时钟 kod 访问违规时发送 KoD 包。 server段 server IP地址或域名 [prefer] perfer优先 server 192.168.1.103 fudge 192.168.1.103 stratum 10 启动服务 [rootlocalhost ~]# systemctl start ntpd.service [rootlocalhost ~]# systemctl enable ntpd.service 客户端同步 Ntpdate 192.168.1.103 报错 20 Oct 16:51:24 ntpdate[2340]: no server suitable for synchronization found 错误1ntpdate -u ip - no server suitable for synchronization found 判断在ntp客户端用ntpdate –d serverIP查看发现有“Server dropped: strata too high”的错误并且显示“stratum 16”。而正常情况下stratum这个值得范围是“0~15”。 原因NTP server还没有和其自身或者它的server同步上。在ntp server上重新启动ntp服务后ntp server自身或者与其server的同步的需要一个时间段这个过程可能是5分钟在这个时间之内在客户端运行ntpdate命令时会产生no server suitable for synchronization found的错误。 处理等待几分钟后重试一般解决。 也可以使用命令 ntpq -p查看情况 查看服务连接和监听 ntpq -p 查看网络中的NTP服务器同时显示客户端和每个服务器的关系 ntpstat 命令查看时间同步状态这个一般需要5-10分钟后才能成功连接和同步 客户端同步 转载于:https://www.cnblogs.com/huxl1/p/9822447.html