-- 暂无子节点 --
ubuntu 安装命令:
sudo apt-get install ntp
启动命令:
/etc/init.d/ntp start
查看NTP服务的运行状况:
watch ntpq -p
配置文件:
/etc/ntp.conf
允许时间同步网段:
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
参数有以下几个:
ignore :关闭所有的 NTP 联机服务
nomodify:客户端不能更改服务端的时间参数,但是客户端可以通过服务端进行网络校时。
notrust :客户端除非通过认证,否则该客户端来源将被视为不信任子网
noquery :不提供客户端的时间查询
注意:如果参数没有设定,那就表示该 IP (或子网)没有任何限制!