NTP(chrony)を設定した備忘録
サーバのデフォルト設定で運用していたところ、気づいたら時刻同期がずれていたため、NTPを設定した手順を以下に示す。
環境
$ cat /etc/redhat-release
CentOS Linux release 8.1.1911 (Core)
設定手順
$ cp -pi /etc/chrony.conf{,.org}
$ vi /etc/chrony.conf
$ diff chrony.conf chrony.conf.org
3,5c3
< #pool 2.centos.pool.ntp.org iburst
< pool ntp.nict.jp iburst
< pool ntp.jst.mfeed.ad.jp iburst
---
> pool 2.centos.pool.ntp.org iburst
$ systemctl restart chronyd.service
$ systemctl enable chronyd.service
Created symlink /etc/systemd/system/multi-user.target.wants/chronyd.service → /usr/lib/systemd/system/chronyd.service.
メモ
ドメイン名 | 場所 | 公式ページ |
---|---|---|
ntp.nict.jp | 国立研究開発法人 情報通信研究機構 | https://jjy.nict.go.jp/tsp/PubNtp/index.html |
ntp.jst.mfeed.ad.jp | インターネットマルチフィード株式会社 | https://www.mfeed.ad.jp/ntp/detail.html |
2.centos.pool.ntp.org | 不明 | 不明 |
「2.centos.pool.ntp.org」は何者??
調べたが、わからなかった...
whois情報は返却されなかった。
$ whois 2.centos.pool.ntp.org
NOT FOUND
>>> Last update of WHOIS database: 2020-09-14T04:47:48Z <<<
Access to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.
The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.
nslookupも権威サーバではなく、キャッシュDNSサーバが回答してしまっているため、場所を特定できず...
$ nslookup 2.centos.pool.ntp.org
Server: 118.27.60.132
Address: 118.27.60.132#53
Non-authoritative answer:
Name: 2.centos.pool.ntp.org
Address: 79.143.250.119
Name: 2.centos.pool.ntp.org
Address: 193.25.222.240
Name: 2.centos.pool.ntp.org
Address: 64.225.34.103
Name: 2.centos.pool.ntp.org
Address: 66.85.78.80
Name: 2.centos.pool.ntp.org
Address: 2606:4700:f1::123
Name: 2.centos.pool.ntp.org
Address: 2400:8500:1801:418:a118:27:37:521
Name: 2.centos.pool.ntp.org
Address: 2001:470:fc6f::123
Name: 2.centos.pool.ntp.org
Address: 2606:4700:f1::1