1.首先使用查询是否有这个服务

systemctl list-unit-files --type=service

在这里插入图片描述
2.如果有的话执行

systemctl daemon-reload

3.如果没有服务在这里插入图片描述
4.则通过yum安装ntpd同步服务

[root@localhost ~]# yum install -y ntp      //安装时间同步程序

5.ntpd命令

systemctl restart ntpd 
systemctl enable ntpd
[root@localhost ~]# service ntpd start   
[root@localhost ~]# ntpdate -u cn.pool.ntp.org    //同步网络时间
[root@localhost ~]# vi /etc/ntp.conf   //配置时间同步``

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐