1、设置时区(同步时间前先设置)
timedatectl set-timezone Asia/Shanghai
2、安装组件
yum -y install ntp
systemctl enable ntpd
systemctl start ntpd
3、同步时间
ntpdate -u cn.pool.ntp.org
4、查看时间
date
timedatectl set-timezone Asia/Shanghai
yum -y install ntp
systemctl enable ntpd
systemctl start ntpd
ntpdate -u cn.pool.ntp.org
date
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。