先安装
1 | yum install -y ntpdate |
然后同步时间
1 | ntpdate -u cn.pool.ntp.org |
如果执行以上错误出现Denied,或许是你是使用的机器是子机,其母鸡已经同步时间过了。所以直接执行以下步骤即可。
设置中国时区(北京时间)
1 | timedatectl set-timezone Asia/Shanghai |
重启服务器
1 | reboot |
以上
1 | yum install -y ntpdate |
1 | ntpdate -u cn.pool.ntp.org |
如果执行以上错误出现Denied,或许是你是使用的机器是子机,其母鸡已经同步时间过了。所以直接执行以下步骤即可。
1 | timedatectl set-timezone Asia/Shanghai |
1 | reboot |
以上

labulac