发布网友
共1个回答
热心网友
在除了运行ntpd之外的机器上,执行:
[html]
# chkconfig --list | grep ntpd
看看ntpd有没有开机自启动(如果显示的全为off则表明不是开机自启动),如果是开机自启动的,需要执行:
[html]
# chkconfig ntpd off
关闭ntpd,如果ntpd开着,ntpdate没办法从其他服务器同步时间的。
然后在/etc/rc.local(debian/ubuntu系统中可能是/etc/rc.d/rc.local)末尾加入一行:
[html]
ntpdate xxx.xxx.xxx.xxx
xxx表示运行ntpd的那台服务器的ip地址
然后重启就可以了。