CentOS7 日期时间设置

原文地址:https://www.jianshu.com/p/6c03ec89bda0

1.设置系统时间为中国时区并启用NTP同步

yum install ntp // 安装ntp服务
systemctl enable ntpd // 开机启动服务
systemctl start ntpd // 启动服务
timedatectl set-timezone Asia/Shanghai // 更改时区
timedatectl set-ntp yes // 启用ntp同步
ntpq -p // 同步时间
posted @ 2021-05-13 10:57  eyesfree  阅读(172)  评论(0编辑  收藏  举报