LoginSignup
0
0

More than 1 year has passed since last update.

自宅サーバー構築譚:NTPクライアント

Last updated at Posted at 2022-03-28

能書き

自宅サーバー構築譚:基本構想に基づく自宅サーバー構築。将来の Kerberos の設定を睨んで、時刻をきちんと設定する事にしました。

時刻同期はサーバーのみならずクライアントでも必須です。テスト用には時刻をわざとずらせるようにした方が都合が良い事も多いんですが、それはまた別の話。

systemd-timesyncd が勝手に動いてるので放置しておけば良いのですけども。日本人が日本にサーバーを立てるなら、NTP サーバーはやはり ntp.nict.jp ではないかと考える次第です。

参考文献1:日本標準時 に直結した時刻サーバ - 公開NTP - 日本標準時グループ
参考文献2:[Q.1-7] 個人ユーザですが、stratum 1 にアクセスしても構いませんか? - NICT公開NTP FAQ - 日本標準時グループ

と言う訳で、NTP サーバをデフォルトから変更します。

準備

今回は/etcの修正だけなので、スナップショットは不要でしょう。気になる方は撮って下さい。

NTP クライアントが動いている事を確認します。

参考文献:NTP サーバー : NTP クライアントの設定 - ServerWorld

systemctl status systemd-timesyncd

または

timedatectl timesync-status

設定

sed -i -e"/^#NTP=/c NTP=ntp.nict.jp" /etc/systemd/timesyncd.conf
systemctl restart systemd-timesyncd

確認

準備と同じコマンドを実行して確認します。

特に難しい事も無いので、一発で行けるでしょう。

完了

cd /etc
svn ci -m"setting NTP client"

やったね!:thumbsup_tone2:

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0