SMALL

솔라리스 11 버전 에서 ntp 설정을 하여 시간 동기화를 진행 하려고 한다.

 

먼저 솔라리스 버전을 확인

[root ~]# uname -a
SunOS dbms1 5.11 11.3 i86pc i386 i86pc

ntp 설정이 안되어 있는것을 확인

ps -ef |grep ntp
root 16369 16364   0 15:11:56 pts/2       0:00 grep ntp

cd /etc/inet를 확인하여 보면 ntp.conf 파일이 없을 것을 알수있다.

[root ~]# cd /etc/inet
[root ~]# ls
datemsk.ndpd                ipaddrsel.conf              networks                    services
dhcpd.conf.example          ipnodes                     ntp.client                  slp.conf.example
hosts                       ipsecalgs                   ntp.server                  static_routes-DefaultFixed
ike                         ipsecinit.sample            protocols                   wanboot.conf.sample
inetd.conf                  netmasks                    secret

그렇기 때문에

ntp.client 파일을 카피 하여 ntp.conf 파일을 생성 한다.

-bash-4.1# cp ntp.client ntp.conf
-bash-4.1# ls
datemsk.ndpd                ipaddrsel.conf              networks                    secret
dhcpd.conf.example          ipnodes                     ntp.client                  services
hosts                       ipsecalgs                   ntp.conf                    slp.conf.example
ike                         ipsecinit.sample            ntp.server                  static_routes-DefaultFixed
inetd.conf                  netmasks                    protocols                   wanboot.conf.sample

ntp.conf 파일 끝에 추가 하여


server [NTP 서버 IP] 를 입력( 저는 내부 ntp 서버 10.10.10.10 을 입력)

 

참고!!

국내 NTP 제공 사이트

zero.bora.net

ntp.ewha.net

ntp1.epidc.co.kr

ntp2.epidc.co.kr

kr.pool.ntp.org

kr.pool.ntp.org

# To configure leap seconds processing, download the latest NIST leap seconds
# file to /etc/inet, and then create a symbolic link to it from the ntp.leap
# file. Without this file, NTP will still be able to accept leap announcements
# from its upstream sources. If this file exists and is less than 6 months old
# then the contents of this file will take precedence over the upstream servers.
# The latest leap seconds file is always available at ftp://time.nist.gov/pub

#leapfile /etc/inet/ntp.leap

server 10.10.10.10

데몬 재시작

#svcadm restart svc:/network/ntp:default

데몬 중지

#svcadm disable -st svc:/network/ntp:default

 데몬 사용

#svcadm enable -st svc:/network/ntp:default

ntp 서비스 실행중인것 확인 

-bash-4.1# ps -ef | grep ntp
    root 16915     1   0 15:40:46 ?           0:00 /usr/lib/inet/ntpd -p /var/run/ntp.pid -g
    root 16918 16501   0 15:33:44 pts/2       0:00 grep ntp

ntpq -p 명령으로 실제 연동상태 확인

-bash-4.1# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*dns.hello.re.kr  203.248.240.140  3 u   19   64    1    0.227   -5.248   0.001

 

LIST

+ Recent posts