【问题标题】:Centos7 AMI need to sync the time from Amazon ntp serverCentos7 AMI 需要从 Amazon ntp 服务器同步时间
【发布时间】:2016-09-16 04:26:40
【问题描述】:

我使用的是centos7 AMI,我需要从亚马逊(x.amazon.pool.ntp.org)ntp服务器同步时间,我该如何配置,我需要为此打开端口123吗?

【问题讨论】:

  • 您为什么不尝试一些事情,然后将您遇到的特定问题或问题回复给我们?
  • 我配置了 ntp 客户端,但在传递 ntpdate 命令时收到以下消息 16 Sep 04:51:55 ntpdate[29134]: no servers can be used, exiting

标签: amazon-web-services amazon-ec2 centos7 ntp


【解决方案1】:

PS:我想评论问题,但我没有足够的声誉。

如果您在 AWS 上,并且在 VPC 内,或者说您的实例应用了安全组 (SG) 和网络 ACL,这会阻止 ntp 同步,那么您必须在 ACL 和 SG 上打开端口 123 才能连接到 amazon/ubuntu服务器进行同步。 (我遇到了类似的问题 - 打开端口解决了它)。

如果还没有尝试过,您可以安装 ntp 并尝试同步它

sudo yum install ntp
chkconfig ntpd on
ntpdate pool.ntp.org
service ntpd start

从这里参考link ntp 命令,因为我更熟悉基于 ubuntu(debian) 的命令

【讨论】:

  • amazon ami 在配置中也带有 amazon ntp 池,但这并没有什么不同,因为 amazon ntp 服务器也在公共域中,而不是在 amazon 内部基础设施中,因此您可能必须打开 123 端口到互联网面对。
  • 尝试使用新的服务器池更新 /etc/ntp.conf - 可能是像“server 0.ubuntu.pool.ntp.org”或 ntp.server.com 这样的 ubuntu 池
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-06-29
相关资源
最近更新 更多