Linux ntp
1. ntp Ű ġ Ȯ
[root@reyad etc]# rpm -qa | grep ntp
ntp-4.2.0.a.20040617-4
[root@reyad etc]#
Ntp Ű ġ Ǿ ش ´ CD Ű ġ Ҽ .
Ű ġ
#rpm –ivh ntp~~~~~
2. ý ntp Ȱȭ Ȯ
[root@reyad etc]# chkconfig --list | grep ntp
ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@reyad etc]#
Chkconfig ̿Ͽ ý ntpd Ȱȭ Ȯ 3,5 level off Ǿ ڵ Ȱȭ
. ڵ Ȱȭ ϱ ؼ 3,4 on
[root@reyad etc]# chkconfig --level 3 ntpd on
[root@reyad etc]# chkconfig --level 5 ntpd on
[root@reyad etc]# chkconfig --list | grep ntp
ntpd 0:off 1:off 2:off 3:on 4:off 5:on 6:off
[root@reyad etc]#
3. ntpd.conf
[root@reyad etc]#vi /etc/ntpd.conf
restrict default nomodify notrap noquery κп
server kr.pool.ntp.org
server asia.pool.ntp.org
server pool.ntp.org
߰
4. ntpd
[root@reyad etc]#/etc/rc.d/init.d/ntp start
5. ntpd ð Ȯ
[root@reyad etc]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
58.73.137.250 .INIT. 16 u - 64 0 0.000 0.000 4000.00
58.73.137.250 .INIT. 16 u - 64 0 0.000 0.000 4000.00
218.234.23.44 .INIT. 16 u - 64 0 0.000 0.000 4000.00
+218.234.23.44 211.115.194.21 3 u 4 64 377 6.229 18.609 5.512
58.73.137.250 .INIT. 16 u - 64 0 0.000 0.000 4000.00
*58.73.137.250 .GPS. 1 u 60 64 377 11.497 13.709 7.218
LOCAL(0) LOCAL(0) 10 l 53 64 377 0.000 0.000 0.001
[root@reyad etc]#
* ִ Ÿ
6. /var/log/messages Ȯ
[root@reyad etc]# tail -f /var/log/messages
Mar 18 09:40:18 reyad ntpd: ntpd shutdown succeeded
Mar 18 09:40:20 reyad ntpd[12506]: ntpd 4.2.0a@1.1190-r Mon Oct 11 09:10:20 EDT 2004 (1)
Mar 18 09:40:20 reyad ntpd[12506]: precision = 1.000 usec
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface wildcard, 0.0.0.0#123
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface wildcard, ::#123
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface lo, 127.0.0.1#123
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface eth0, 192.168.0.222#123
Mar 18 09:40:20 reyad ntpd[12506]: kernel time sync status 0040
Mar 18 09:40:20 reyad ntpd: ntpd startup succeeded
Mar 18 09:40:24 reyad ntpd[12506]: frequency initialized 0.000 PPM from /var/lib/ntp/drift