Skip to Content
Linux クックブック、第 2 版
book

Linux クックブック、第 2 版

by Carla Schroder
May 2025
Intermediate to advanced
544 pages
7h 23m
Japanese
O'Reilly Media, Inc.
Content preview from Linux クックブック、第 2 版

第17章. ntpd、chrony、timesyncdで時間を管理する

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

NTP(Network Time Protocol)を使えば、あなたのコンピュータやネットワーク上のすべてのホストで、正確な時間を簡単に自動で維持できる。NTPはLinux上では、NTPデーモンであるntpdntpdの最新版であるchrony、そしてsystemdのtimesyncdで実装されている。そう、 Linuxコンピュータの時間を自動的に管理する方法は3つあるのだ。

ntpdと chronyはLANタイムサーバーとしても機能するが、timesyncdはサーバー関数を持たない、よりシンプルな軽量クライアントである。ntpdと chronyは完全なNTP実装であるが、timesyncdはSNTP(Simple Network Time Protocol)を使用する。

ほとんどのLinuxディストリビューションは、そのディストリビューションが管理しているタイム・サーバを指すデフォルトの設定を提供している。これらのサーバは、2.fedora.pool.ntp.orgや 0.ubuntu.pool.ntp.orgのような名前が付いている。インストール中にこれを無効にしないようにする以外は、何もする必要はない。この章では、現在の設定の確認方法、変更方法、LANタイムサーバの設定方法を学ぶ。

、誰もが無料で使えるタイムサーバーのネットワークが世界中にあり、それらは地層0から始まる地層に組織されている。地層0は、原子時計、原子時計に同調する電波受信機、GPS衛星から放送される信号を利用するGPS受信機のネットワークで、すべての計時の源となっている。

次の行は、プライマリー・タイム・サーバが存在するストラタム1である。層1のプライマリー・タイム・サーバは層0のソースにディレクトリ接続されている。

ストラタム2には何千ものパブリックサーバーがあり、ストラタム1と同期している。ストラタム1のサーバーが過負荷になるのを防ぐためにストラタム2のサーバーに接続し、正当な理由なくストラタム1のサーバーを使用しないのがマナーだ。

例えば、階層4、5、6のパブリックサーバと、それらと同期するプライベートLANサーバがある。プライベートLANのNTPサーバーをstratum10に指定すれば、stratum9のサーバーに接続する必要はなく、到達できるサーバーならどこでも接続できる。個々のサーバーではなく、NTPサーバーのクラスターであるプールサーバーを使うので、正しいサーバーを選択する心配はない。

NTPプール・プロジェクトとNTP: ネットワーク・タイム・プロトコルを訪れて、オタク的なことや自分自身のパブリック・タイム・サーバを運営する方法を学ぼう。

Linuxシステムには、少なくとも2つのタイムキーパーがある。一つは、 あなたのマザーボード上のハードウェアクロックで、リアルタイムクロック(RTC)とも呼ばれている。もう1つはシステム・タイムで、Linuxカーネルによって管理されている。RTCは、マシンの電源がオフになっていても、マザーボード上のバッテリーやコンデンサーから常に電力を供給されている。Linuxコンピューターが起動すると、選択したNTPクライアントがRTCから時刻を取得する。その後、ネットワークが利用可能になると、アップストリーム・タイムサーバに従って時刻を修正する。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Jake VanderPlas, 菊池 彰
Bash クックブック第2版

Bash クックブック第2版

Carl Albing, JP Vossen
行動を変えるデザイン ―心理学と行動経済学をプロダクトデザインに活用する

行動を変えるデザイン ―心理学と行動経済学をプロダクトデザインに活用する

Stephen Wendel, 武山 政直, 相島 雅樹, 反中 望, 松村 草也

Publisher Resources

ISBN: 9798341650091