"CentOS ntp 설치"의 두 판 사이의 차이

3번째 줄: 3번째 줄:


==설치 확인==
==설치 확인==
<code>yum info ntp</code>로 설치 여부를 확인해 보자.
<source lang='dos'>
<source lang='dos'>
[root@localhost ~]# yum info ntp
[root@jmnote ~]# rpm -qa 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.
</source>
</source>
ntp 4.2.2p1 (릴리즈 15.el5.centos)이 설치되어 있다. 원한다면 ntp 4.2.2p1 (릴리즈 15.el5.centos.1)로 업데이트 가능하다.


==설치 위치==
==설치 위치==

2012년 10월 2일 (화) 00:59 판

1 설치 확인

[root@jmnote ~]# rpm -qa ntp*

2 설치 위치

[root@localhost ~]# whereis ntp
ntp: /etc/ntp /etc/ntp.conf
[root@localhost ~]# which ntpq
/usr/sbin/ntpq
[root@localhost ~]# which ntpdate
/usr/sbin/ntpdate
[root@localhost ~]# 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 }}