| >> HOME >> FC5 MENU >> NTP 時刻同期サーバー (ntpd) |
 |
|
|
|
|
|
|
|
|
|
|
| |
[root@linux ~]# yum -y install ntp
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core [1/3]
updates [2/3]
extras [3/3]
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for ntp to pack into transaction set.
ntp-4.2.0.a.20050816-11.F 100% |=========================| 40 kB 00:00
---> Package ntp.i386 0:4.2.0.a.20050816-11.FC5 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
ntp i386 4.2.0.a.20050816-11.FC5 updates 1.2 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 1.2 M
Downloading Packages:
(1/1): ntp-4.2.0.a.200508 100% |=========================| 1.2 MB 00:05
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: ntp ######################### [1/1]
Installed: ntp.i386 0:4.2.0.a.20050816-11.FC5
Complete!
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# vi /etc/ntp.conf
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
#restrict default kod nomodify notrap nopeer noquery
restrict default ignore
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict ntp1.jst.mfeed.ad.jp mask 255.255.255.255 nomodify notrap noquery
restrict ntp2.jst.mfeed.ad.jp mask 255.255.255.255 nomodify notrap noquery
restrict ntp3.jst.mfeed.ad.jp mask 255.255.255.255 nomodify notrap noquery
# -- CLIENT NETWORK -------
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
# --- OUR TIMESERVERS -----
# 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
#server 1.fedora.pool.ntp.org
#server 2.fedora.pool.ntp.org
server ntp1.jst.mfeed.ad.jp
server ntp2.jst.mfeed.ad.jp
server ntp3.jst.mfeed.ad.jp
# --- NTP MULTICASTCLIENT ---
#multicastclient # listen on default 224.0.1.1
# restrict 224.0.1.1 mask 255.255.255.255 nomodify notrap
# restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /var/lib/ntp/drift
# Keys file. If you want to diddle your server at run time, make a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
keys /etc/ntp/keys
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# ntpdate ntp1.jst.mfeed.ad.jp
1 Aug 22:59:19 ntpdate[1567]: step time server 210.173.160.27 offset -430.879226 sec
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# service ntpd start
ntpd を起動中: [ OK ]
|
|
|
| |
|
|
| |
[root@linux ~]# chkconfig ntpd on
[root@linux ~]# chkconfig --list ntpd
ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
|
|
|
|
|
|
| |
|
|
| |
|
|
| |
[root@linux ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp1.jst.mfeed. 210.173.160.56 2 u 8 64 1 25.556 -0.869 0.002
ntp2.jst.mfeed. 210.173.160.86 2 u 7 64 1 24.290 -0.882 0.002
ntp3.jst.mfeed. 210.173.160.86 2 u 6 64 1 25.217 -1.170 0.002
LOCAL(0) LOCAL(0) 10 l 5 64 1 0.000 0.000 0.002
|
|
|
| |
|
|
| |
|
|
| |
[root@linux ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp1.jst.mfeed. 210.173.160.56 2 u 44 64 77 24.517 -1.533 1.406
ntp2.jst.mfeed. 210.173.160.86 2 u 39 64 77 24.290 -0.882 0.909
ntp3.jst.mfeed. 210.173.160.86 2 u 41 64 77 24.221 -1.404 99.389
LOCAL(0) LOCAL(0) 10 l 37 64 77 0.000 0.000 0.002
|
|
|
| |
|
|
 |
|
 |
 |