centOS ntp 설치

Jmnote (토론 | 기여)님의 2012년 10월 2일 (화) 01:00 판 (→‎설치 확인)

1 설치 확인

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

2 설치

[root@jmnote ~]# yum install ntp -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ntp.x86_64 0:4.2.4p8-2.el6.centos will be installed
--> Processing Dependency: ntpdate = 4.2.4p8-2.el6.centos for package: ntp-4.2.4p8-2.el6.centos.x86_64
--> Running transaction check
---> Package ntpdate.x86_64 0:4.2.4p8-2.el6.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================
 Package           Arch             Version                           Repository      Size
===========================================================================================
Installing:
 ntp               x86_64           4.2.4p8-2.el6.centos              Daum           444 k
Installing for dependencies:
 ntpdate           x86_64           4.2.4p8-2.el6.centos              Daum            58 k

Transaction Summary
===========================================================================================
Install       2 Package(s)

Total download size: 501 k
Installed size: 1.2 M
Downloading Packages:
(1/2): ntp-4.2.4p8-2.el6.centos.x86_64.rpm                          | 444 kB     00:00     
(2/2): ntpdate-4.2.4p8-2.el6.centos.x86_64.rpm                      |  58 kB     00:00     
-------------------------------------------------------------------------------------------
Total                                                      571 kB/s | 501 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : ntpdate-4.2.4p8-2.el6.centos.x86_64                                     1/2 
  Installing : ntp-4.2.4p8-2.el6.centos.x86_64                                         2/2 
  Verifying  : ntp-4.2.4p8-2.el6.centos.x86_64                                         1/2 
  Verifying  : ntpdate-4.2.4p8-2.el6.centos.x86_64                                     2/2 

Installed:
  ntp.x86_64 0:4.2.4p8-2.el6.centos                                                        

Dependency Installed:
  ntpdate.x86_64 0:4.2.4p8-2.el6.centos                                                    

Complete!

3 설치 위치

[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는 중지된 상태이다.

4 동기화 서버 설정

5 즉시 동기화

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

6 같이 보기

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