linux:ntp

文書の過去の版を表示しています。


NTPサーバー

$ sudo dnf install ntp

設定ファイルのバックアップ。

$ sudo cp /etc/ntp.conf /etc/ntp.conf.org

設定ファイルの修正。

$ sudo vi /etc/ntp.conf
# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#pool 2.fedora.pool.ntp.org iburst
pool ntp.jst.mfeed.ad.jp iburst      # MFEED
pool ntp.nict.jp iburst              # NICT
server s2csntp.miz.nao.ac.jp iburst  # NAO
pool ntp.ring.gr.jp iburst           # Ring Server
$ sudo firewall-cmd --permanent --add-service=ntp
$ sudo firewall-cmd --reload
$ sudo systemctl enable ntpd.service

サービスを起動する前に手動で同期しておく。

$ sudo ntpdate ntp.nict.jp
$ sudo systemctl start ntpd.service
  • linux/ntp.1546735693.txt.gz
  • 最終更新: 2019/05/18 02:23
  • (外部編集)