[关闭]
@awsekfozc 2016-04-05T02:25:46.000000Z 字数 258 阅读 987

时间同步

CM
datetime-syns.sh

  1. #!/bin/sh
  2. # step 1:ntpd stop
  3. /sbin/service ntpd stop
  4. # step 2:sync datetime
  5. /usr/sbin/ntpdate bigdata-cdh104.zc.com
  6. # step 3:ntpd start
  7. /sbin/service ntpd start
  1. $ sudo chmod u+x datetime-syns.sh
  2. $ sudo crontab -e
  3. >>>内容
  4. 0-59/10 * * * * /bin/sh /opt/cloudera/datetime-syns.sh

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注