1.时间同步服务器

1.安装ntpdate

  yum -y install ntp

2.执行如下命令

  ntpdate  time.nist.gov        ####时间服务器域名

3.在crontab 中添加脚本同步(crontab -e)

  */5 * * * *  /bin/ntpdate  time.nist.gov  >/dev/null 2>&1

4.如下是推荐的几种时间服务器供选择使用

time.nist.gov
time.nuri.net
asia.pool.ntp.org
asia.pool.ntp.org
asia.pool.ntp.org
asia.pool.ntp.org

 注意:如果不能修改的话,说明是时区问题,需要在环境变量文件中(/etc/profile)中加入

export  TZ='Asia/Shanghai'

posted on 2020-11-15 10:56  太白金星有点烦  阅读(71)  评论(0编辑  收藏  举报

导航