NTP-Server: 1개의 글

[CentOS-6.X] 리눅스를 NTP 서버로 만들기 (시간동기화 서버)

Posted by nkjok
2019. 4. 5. 10:32 OS&기타/Linux
반응형

1. 설치한다.

[root@localhost ~]# yum -y install ntp

 

2. 설정을 수정한다

[root@localhost ~]# vi /etc/ntp.conf

# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap (NTP 행위를 허용할 IP 범위 설정)
restrict 192.168.3.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server 127.127.1.0 #local clock

vi에디터로 ntp.conf를 열어서 IP 범위를 지정하고 Server 리스트를 주석(#) 처리한다.

 

3. 서비스를 시작한다.

[root@localhost ~]# service start ntpd

 

4. 서비스를 부팅 시 자동으로 시작하게 설정한다.

[root@localhost ~]# chkconfig ntpd on 

 

이제 시간을 동기화할 컴퓨터에 이 리눅스의 IP를 NTP서버로 지정해주면 된다.

 

끝 !

 

 

 

참고용. 

[root@localhost ~]# chkconfig --list ntpd
ntpd 0:해제 1:해제 2:활성 3:활성 4:활성 5:활성 6:해제 (init로 부팅됬을때 자동 활성화 여부)

반응형