Centos8 chronyd时间同步服务

Centos8 chronyd时间同步服务

chronyc sources -v

-bash chronyc 未找到命令

1、安装

dnf install chrony -y
Centos8 chronyd时间同步服务

2、启动服务

systemctl start chronyd.service

3、查看服务状态

systemctl status chronyd.service

Centos8 chronyd时间同步服务

4、修改时间同步服务

vim /etc/chrony.conf

Centos8 chronyd时间同步服务
注释掉

#pool 2.centos.pool.ntp.org iburst

加入新的时间服务器

server 210.72.145.44 iburst
server ntp.aliyun.com iburst

5、重启服务

systemctl restart chronyd.service

6、时间同步

chronyc sourcestats -v

Centos8 chronyd时间同步服务

7、配置开机启动

systemctl enable chronyd.service

7、查看本机时间

timedatectl

Centos8 chronyd时间同步服务