Linux服务器时间同步

Centos7操作系统时间同步

date //查看当前系统时间
yum -y install ntp   //安装ntp服务
systemctl enable ntpd  //开机启动服务
systemctl start  ntpd  //启动服务
timedatectl set-timezone Asia/Shanghai //更改时区
timedatectl set-ntp yes  //启动ntp同步
ntpq -p  //同步时间
posted @ 2020-01-09 10:48  慵懒的胖墩  阅读(120)  评论(0)    收藏  举报