1.客户段需要的软件
chrony (chrony-1.29.1-1.el7.x86_64)
[root@server0 opt]# rpm -q chrony #检查软件是否安装
chrony-1.29.1-1.el7.x86_64
2.配置软件
配置路径 /etc/chrony.conf
vim /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.rhel.pool.ntp.org iburst #注释掉自带服务地址
#server 1.rhel.pool.ntp.org iburst #注释掉自带服务地址
#server 2.rhel.pool.ntp.org iburst #注释掉自带服务地址
server classroom.example.com iburst #填写自己的服务地址
# Ignore stratum in source selection.
3.重新启动服务
[root@server0 opt]# systemctl restart chronyd #重起服务
[root@server0 opt]# systemctl enable chronyd #将服务设为开机启动
4.检测
ps :更改时间后可能要稍稍等下,会有一定的等待时间
[root@server0 opt]# date
2018年 09月 06日 星期四 21:53:20 CST
[root@server0 opt]# date -s "2008-1-1 12:0:0" #更改系统时间
2008年 01月 01日 星期二 12:00:00 CST
[root@server0 ~]# date
2008年 01月 01日 星期二 12:00:43 CST
[root@server0 ~]# date
2008年 01月 01日 星期二 12:00:44 CST
[root@server0 ~]# date
2018年 09月 06日 星期四 22:01:48 CST ##时间已自动更改