RHCSA认证考试---7.配置 NTP

红帽RHCE考试上午-RHCSA(RH200)

servera.example.com 任务

7. 配置NTP

• 配置servera作为NTP的客户端,跟时间服务器172.25.254.254同步时间。

题目内容解析:

• 首选需要安装时间服务chrony,运行并设置为开机自启

• 配置同步时间服务的配置文件,设置时间的服务器为172.25.254.254


实操演示过程:

安装chrony时间同步服务

[root@servera managers]# yum install -y chrony

............
Complete!

启动chrony服务并设置为开机自启

[root@servera ~]# systemctl enable chronyd
[root@servera ~]# systemctl start chronyd

配置chrony时间同步服务器的配置文件

[root@servera managers]# vim /etc/chrony.conf

新增的内容如下:
server 172.25.250.254 iburst

重启chrony服务

[root@servera managers]# systemctl restart chronyd

验证与时间服务器的时间差

[root@servera managers]# chronyc sources -v

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current best, '+' = combined, '-' = not combined,
| /             'x' = may be in error, '~' = too variable, '?' = unusable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^- time.cloudflare.com           3   6    17    16  +1620us[+1613us] +/-   94ms
^* 111.230.189.174               2   6    17    15   -647us[ -653us] +/-   17ms
^+ time.neu.edu.cn               1   6    17    16   +594us[ +588us] +/-   31ms
^? 172.25.254.254                0   7     0     -     +0ns[   +0ns] +/-    0ns

[root@servera yum.repos.d]# nslookup 172.25.254.254

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

jiang0615csdn

你对鼓励是我最大的动力来源

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值