文書の過去の版を表示しています。
NTPサーバー
パッケージインストール
$ sudo dnf install ntp
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 #server -4 ntp.nict.jp # NICT #server -4 s2csntp.miz.nao.ac.jp # NAO #server -4 ntp.ring.gr.jp # 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