Linux基础学习-chrony时间同步服务

Chrony时间同步

NTP(Network Time Protocol,网络时间协议)是用来使网络中的各个计算机时间同步的一种协议.它的用于是把计算机的时钟同步到世界协调时UTC,其精度在局域网内可达0.1ms,在网络网上绝大多数的地方其精度可以达到1-50ms.

1.chrony服务部署
//查看一下由哪个包提供的
[root@ntp-server ~]# yum provides chronyd
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
chrony-3.1-2.el7.x86_64 : An NTP client/server
Repo        : dvd
Matched from:
Filename    : /usr/sbin/chronyd


//安装chrony服务
[root@ntp-server ~]# yum install chrony
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
dvd                                                                | 4.1 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package chrony.x86_64 0:3.1-2.el7 will be installed
--> Processing Dependency: libseccomp.so.2()(64bit) for package: chrony-3.1-2.el7.x86_64
--> Running transaction check
---> Package libseccomp.x86_64 0:2.3.1-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================
 Package                Arch               Version                  Repository       Size
==========================================================================================
Installing:
 chrony                 x86_64             3.1-2.el7                dvd             237 k
Installing for dependencies:
 libseccomp             x86_64             2.3.1-3.el7              dvd              56 k

Transaction Summary
==========================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 293 k
Installed size: 761 k
Is this ok [y/d/N]: y
Downloading packages:
------------------------------------------------------------------------------------------
Total                                                     1.6 MB/s | 293 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libseccomp-2.3.1-3.el7.x86_64                                          1/2 
  Installing : chrony-3.1-2.el7.x86_64                                                2/2 
  Verifying  : chrony-3.1-2.el7.x86_64                                                1/2 
  Verifying  : libseccomp-2.3.1-3.el7.x86_64                                          2/2 

Installed:
  chrony.x86_64 0:3.1-2.el7                                                               

Dependency Installed:
  libseccomp.x86_64 0:2.3.1-3.el7                                                         

Complete!

//启动服务
[root@ntp-server ~]# systemctl start chrony
chrony-dnssrv@       chronyd.service      chrony-wait.service  
[root@ntp-server ~]# systemctl start chronyd

chrony服务相关命令

参数 解释
list-timezones 列出可用时区信息
set-timezone 设置时区
set-ntp 启用NTP
status 查看状态
<
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值