需要先在Linux下面使用root用户,安装这个命令
yum install ntp
安装ntpdate
使用 date 命令查看当前的日期,
使用date -s "2017-11-01" 这样命令设置当前时间,
使用安装的ntp 可以重置最新的时间
ntpdate cn.pool.ntp.org
date -s "2017-11-01 `date +%T`"
这样可以只修改日期不更改时间
需要先在Linux下面使用root用户,安装这个命令
yum install ntp
安装ntpdate
使用 date 命令查看当前的日期,
使用date -s "2017-11-01" 这样命令设置当前时间,
使用安装的ntp 可以重置最新的时间
ntpdate cn.pool.ntp.org
date -s "2017-11-01 `date +%T`"
这样可以只修改日期不更改时间