centOS ntp 설치

Jmnote (토론 | 기여)님의 2012년 3월 29일 (목) 12:35 판 (→‎같이 보기)

1 설치 확인

yum info ntp로 설치 여부를 확인해 보자.

[root@localhost ~]# yum info ntp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Installed Packages
Name       : ntp
Arch       : x86_64
Version    : 4.2.2p1
Release    : 15.el5.centos
Size       : 2.5 M
Repo       : installed
Summary    : Synchronizes system time using the Network Time Protocol (NTP).
URL        : http://www.ntp.org
License    : distributable
Description: The Network Time Protocol (NTP) is used to synchronize a computer's
           : time with another reference time source. The ntp package contains
           : utilities and daemons that will synchronize your computer's time to
           : Coordinated Universal Time (UTC) via the NTP protocol and NTP
           : servers. The ntp package includes ntpdate (a program for retrieving
           : the date and time from remote machines via a network) and ntpd (a
           : daemon which continuously adjusts system time).
           : 
           : Install the ntp package if you need tools for keeping your system's
           : time synchronized via the NTP protocol.

Available Packages
Name       : ntp
Arch       : x86_64
Version    : 4.2.2p1
Release    : 15.el5.centos.1
Size       : 1.3 M
Repo       : updates
Summary    : Synchronizes system time using the Network Time Protocol (NTP).
URL        : http://www.ntp.org
License    : distributable
Description: The Network Time Protocol (NTP) is used to synchronize a computer's
           : time with another reference time source. The ntp package contains
           : utilities and daemons that will synchronize your computer's time to
           : Coordinated Universal Time (UTC) via the NTP protocol and NTP
           : servers. The ntp package includes ntpdate (a program for retrieving
           : the date and time from remote machines via a network) and ntpd (a
           : daemon which continuously adjusts system time).
           : 
           : Install the ntp package if you need tools for keeping your system's
           : time synchronized via the NTP protocol.

ntp 4.2.2p1 (릴리즈 15.el5.centos)이 설치되어 있다. 원한다면 ntp 4.2.2p1 (릴리즈 15.el5.centos.1)로 업데이트 가능하다.

2 설치 위치

[root@localhost ~]# whereis ntp
ntp: /etc/ntp /etc/ntp.conf
[root@mysvn ~]# which ntpq
/usr/sbin/ntpq
[root@mysvn ~]# which ntpdate
/usr/sbin/ntpdate
[root@mysvn ~]# which ntpd
/usr/sbin/ntpd
[root@localhost ntp]# service ntpd status
ntpd is stopped
  • 설정파일 ntp.conf는 /etc에 있다.
  • ntpq, ntpdate, ntpd는 /usr/sbin에 있다.
  • ntpd는 중지된 상태이다.

3 동기화 서버 설정

4 즉시 동기화

명령어
ntpdate 서버주소
실행 예시
[root@localhost ntp]# ntpdate time.windows.com

5 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}