问题:ntpdate同步服务器时间时报:ntpdate[xxx]: the NTP socket is in use, exiting
原因:由于ntpd服务开启
解决:关闭ntpd服务
service ntpd stop
chkconfig ntpd off
内网同步服务器时间,具有内外网双网卡的192.108.56.101做ntp服务器,ntp服务器自身通过外网同步时间.
service ntpd start
chkconfig ntpd on
192.108.56.101 crontab中同步时间的
* 4 * * * /usr/sbin/ntpdate asia.pool.ntp.org > /dev/null 2>&1
由于ntpd服务开启,会报错,更改为:
* 4 * * * sh /exp/ntpdate.sh > /dev/null 2>&1
cat > /exp/ntpdate.sh <
service ntpd stop
/usr/sbin/ntpdate asia.pool.ntp.org
service ntpd start
EOF