Centos 7
#安装软件
[root@ns1 ~]# yum -y install chrony
#修改配置文件
[root@ns1 ~]# vi /etc/chrony.conf22:allow 192.168/16
#设置时区
[root@ns1 ~]#timedatectl set-timezone Asia/Shanghai
#开启服务
root@ns1 ~]#systemctl start chronyd.serviceroot@ns1 ~]#systemctl enable chronyd.service