トップページ > インフォメーション

自宅サーバ構築MY HOME SERVER

サーバ時刻設定(NTP)

- サーバ時刻設定(NTP) -

サーバーにntpクライアントをインストールしておけば、ntpサーバーに接続して正確な時間を取得することができます。 自動で正確な時刻を取得するように設定・保存します。

      
[root@hoge123 ~]# yum -y install ntp ← ntpサービスをインストールします。
[root@hoge123 ~]# vi /etc/ntp.conf ← 設定ファイルを編集します。 19行目付近に時刻同期を許可するローカルネットワークの追記をします。(下記内容を追記します。) restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap 先頭に#をつけます。 #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 ntp1.jst.mfeed.ad.jp server ntp2.jst.mfeed.ad.jp server ntp3.jst.mfeed.ad.jp [root@hoge123 ~]# systemctl start ntpd.service [root@hoge123 ~]#systemctl enable ntpd.service ln -s '/usr/lib/systemd/system/ntpd.service' '/etc/systemd/ system/multi-user.target.wants/ntpd.service' [root@hoge123 ~]# ntpq -p remote refid st t when poll reach delay offset jitter ===================================================================== +ntp1.jst.mfeed. 210.173.160.86 2 u 168 256 377 26.718 0.343 0.175 +ntp2.jst.mfeed. 210.173.176.4 2 u 218 256 377 26.369 0.264 0.142 *ntp3.jst.mfeed. 210.173.176.4 2 u 241 256 377 26.243 0.069 0.330

自宅サーバ構築(fedora17)に戻る


Copyright(C) PCDEMAGIC All Rights Reserved.