我的/etc/rc.local是:
#!/bin/sh
touch /var/lock/subsys/local
/data/automatic/ntpdate.sh我的/data/automatic/ntpdate.sh是:
#!/bin/sh
echo "RWQERWER" >> /data/logs/1.log
ntpdate ntp.fudan.edu.cn >> /data/logs/1.log回声“RW.”正在工作,ntp已安装。ntpdate.sh为744,但ntpdate ntp.fudan.edu.cn运行失败。
在bash命令行外,/data/automatic/ntpdate.sh和ntpdate ntp.fudan.edu.cn >> /data/logs/1.log都成功运行。
我该怎么办?首先谢谢你!
发布于 2013-07-19 07:18:41
丁酸酯被折旧。您应该安装NTP客户端并配置ntpd守护进程配置文件/etc/ntp.conf:
# cat /etc/ntp.conf | grep -v ^# | grep -v ^$
driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server europe.pool.ntp.org
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys并启动守护进程。
# service ntpd starthttps://serverfault.com/questions/524644
复制相似问题