CentOS7使用rdate同步网络时间

事因:因为某台服务器上面时间和实际时间差了将近一分钟(可以使用 date 命令查看时间)。CentOS 上常用的时间同步是 ntpdate,但是这台服务器一直报 no server suitable for synchronization found,无奈放弃。

不过好在还可以使用 rdate 同步。

安装 rdate

使用如下命令安装

yum install rdate

rdate 用法

rdate [-p] [-s] [-u] [-l] [-t sec] [host…]

选项

-p     Print the time returned by the remote machine.

-s     Set the system time to the returned time.

-u     Use UDP instead of TCP as the transport.

-l     Use syslog to output errors (cron.warning) and output (cron.info).

-t     Set timeout in seconds for every attempt to retrieve date.

使用 man rdate 可以查看

rdate同步时间

rdate -s time-b.nist.gov

下面附送系列时间服务器的列表, 有的不一定可以使用哈


time.nist.gov
time-b.nist.gov
216.118.116.105
rdate.darkorb.net
202.106.196.19
time-b.timefreq.bldrdoc.gov

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值