- 论坛徽章:
- 0
|
我有4台linux服务器,想拿其中一台做server,另外三台做client。
在server的ntp.conf中我配置了(不知还需要配别的?)
# Prohibit general access to this service.
#restrict default ignore
# --- NTP MULTICASTCLIENT ---
#multicastclient # listen on default 224.0.1.1
# restrict 224.0.1.1 mask 255.255.255.255 notrust nomodify notrap
# restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
restrict 61.150.25.226 mask 255.255.255.252 notrust nomodify notrap
restrict 61.150.25.230 mask 255.255.255.252 notrust nomodify notrap
restrict 61.150.25.234 mask 255.255.255.252 notrust nomodify notrap
restrict 61.150.25.238 mask 255.255.255.252 notrust nomodify notrap
#restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
在client的.ntp.conf中我配置了
# Prohibit general access to this service.
#restrict default ignore
# --- OUR TIMESERVERS -----
# or remove the default restrict line
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
# restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery
# server mytrustedtimeserverip
server 61.150.25.226
之后我在client端
ntpdate 61.150.25.226
10 Nov 12:09:02 ntpdate[9105]: step time server 61.150.25.226 offset -272.656985 sec
/etc/init.d/ntpd restart
关闭 ntpd:[失败]
启动 ntpd:[ 确定 ]
pgrep ntpd
9218
之后执行ntpq -p后总是报以下错误,不知那里问题
ntpq -p
127.0.0.1: timed out, nothing received
***Request timed out
各位老大帮帮忙吧,我还是个菜鸟级人物! |
|