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刪除。