centos7 root下建立系統時間同步定時任務

步驟1:yum安裝ntp.x86_64測試

步驟2:啓動ntpd.service並設置爲開機啓動spa

步驟3:在root下crontab中添加定時任務code

代碼以下(每分鐘校準一次):blog

*/1 * * * * /usr/sbin/ntpdate -u pool.ntp.org >/dev/null 2>&1

測試:使用crontab

date -s xx/xx/xxxx

修改系統時間,驗證校準效果,實測有效~class

相關文章
相關標籤/搜索