centos7修改服务器时间


修改服务器时间

date -s "2020-01-10 21:55:00"

clock -w

1. 安装ntpdate工具

yum -y install ntp ntpdate

2. 设置系统时间与网络时间同步

ntpdate cn.pool.ntp.org

3. 将系统时间写入硬件时间=

hwclock --systohc

4. 强制系统时间写入CMOS中防止重启失效

  hwclock -w

  或clock -w


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM