NTP时间服务客户端配置

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   ##时间已自动更改

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值