文書の過去の版を表示しています。
NTPサーバー
パッケージインストール
$ sudo yum 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). #server 0.fedora.pool.ntp.org iburst #server 1.fedora.pool.ntp.org iburst #server 2.fedora.pool.ntp.org iburst #server 3.fedora.pool.ntp.org iburst server -4 ntp.nict.jp # NICT server -4 ntp.jst.mfeed.ad.jp # MFEED 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