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

相关文章
相关标签/搜索