Failed to restart ntpd.service: Unit not found时钟同步失败

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   //配置时间同步``

おすすめ

転載: blog.csdn.net/weixin_45387943/article/details/120040613