CentOS-Stream-10 搭建NTP服务器(二)

CentOS-Stream-10 搭建NTP服务器(二)

客户端:

1.安装chrony。

yum install chrony -y systemctl start chronyd systemctl enable chronyd systemctl status chronyd

2.配置文件中注释掉自带服务器同步地址,添加服务器端配置的地址。

#server 0.centos.pool.ntp.org iburst #server 1.centos.pool.ntp.org iburst #server 2.centos.pool.ntp.org iburst #server 3.centos.pool.ntp.org iburst server 192.168.0.249 iburst

3.启用NTP。

systemctl restart chronyd timedatectl set-ntp true

4.查看时间源。

chronyc sources -v

5.手动同步时间。

chronyc -a makestep

6.显示状态。

timedatectl