OS

NTP 설정

solarwind3 2008. 6. 25. 21:27
반응형

1. public NTP server list

2. NTP clients

2.1. linux에서 세팅

  • # rdate -s -p ntp1.cs.pusan.ac.kr
    

  • crontab에 등록(매 시각 동기화) [cron 사용법]Open in a New Window
    # crontab
    0 0 * * * rdate -s ntp1.cs.pusan.ac.kr >/dev/null
    ^D
    #
    

2.2. windows에서 세팅

  • Windows Time 서비스가 실행중이어야 한다.
  • 시작->제어판->날짜 및 시각 정보->인터넷 시간
    • 인터넷 시간 서버와 자동으로 동기화
    • 서버 이름 쳐놓고...

  • 또는 커맨드 프롬프트에서
    c:\>w32tm /register
    c:\>net time /setsntp:ntp1.cs.pusan.ac.kr /set
    
  • registry 수정 (참고: http://support.microsoft.com/kb/q223184/Open in a New Window)
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]
    "NtpServer"="time-a.nist.gov"
    "Type"="NTP"
    "LocalNTP"=dword:00000001
    "Period"=dword:0000fffb
    
  • LocalNTP가 1이면 windows xp가 설치된 컴퓨터를 서버로 운영하게 된다.
  • 아니면 다음 프로그램 다운로드: Upload:NTPC.exeOpen in a New Window (104KB)

3. Server 운영

3.1. NTP 서버 운영

  • windows : windows 세팅 참조. NTPC -- http://home.hawaii.rr.com/lost/Open in a New Window
  • linux: ntp -- http://www.ntp.orgOpen in a New Window
    # cat /etc/xinetd.d/time
    service time
    {
            type            = INTERNAL
            id              = time-stream
            socket_type     = stream
            protocol        = tcp
            user            = root
            wait            = no
            disable         = no
    }
    # cat /etc/xinetd.d/time-udp
    service time
    {
            type            = INTERNAL UNLISTED
            id              = time-dgram
            socket_type     = dgram
            protocol        = udp
            user            = root
            wait            = yes
            disable         = no
            port            = 37
    }     
    # kill -HUP `ps -e | grep xinetd | awk '{ print $1; }'`
반응형