centos7 vmware设置时区和同步时间
非原创 stackover 发表于:2022-05-05 13:08:23
  阅读 :238   收藏   编辑

查看时间

timedatectl

设置时区

timedatectl set-timezone Asia/Shanghai

安装ntp和ntpdate,使用 NTP 公共时间服务器池(NTP Public Pool Time Servers)

yum install ntpdate ntp -y

启动服务

systemctl enable ntpd && sudo systemctl enable ntpdate

开机启动

systemctl start ntpdate && sudo systemctl start ntpd