1. '/etc/rc.conf,d/netdaemons' 수정
######################################
# xntp configuration. See xntpd(1m) #
######################################
#
# Time synchronization daemon
#
# NTPDATE_SERVER: name of trusted timeserver to synchronize with at boot
# (default is rootserver for diskess clients)
# XNTPD: Set to 1 to start xntpd (0 to not run xntpd)
# XNTPD_ARGS: command line arguments for xntpd
#
# Also, see the /etc/ntp.conf and /etc/ntp.keys file for additional
# configuration.
#
export NTPDATE_SERVER='192.168.10.55 192.168.10.56' # 여러서버를 설정하는 경우
export XNTPD=1
export XNTPD_ARGS=
# xntp configuration. See xntpd(1m) #
######################################
#
# Time synchronization daemon
#
# NTPDATE_SERVER: name of trusted timeserver to synchronize with at boot
# (default is rootserver for diskess clients)
# XNTPD: Set to 1 to start xntpd (0 to not run xntpd)
# XNTPD_ARGS: command line arguments for xntpd
#
# Also, see the /etc/ntp.conf and /etc/ntp.keys file for additional
# configuration.
#
export NTPDATE_SERVER='192.168.10.55 192.168.10.56' # 여러서버를 설정하는 경우
export XNTPD=1
export XNTPD_ARGS=
2. '/etc/TIMEZONE' 수정
TZ=KST-9 ← 한국 Time Zone은 KST-9
export TZ
export TZ
3. '/etc/ntp.conf' 수정
#
# Server: The server statement causes polling to be done in client mode rather
# than symmetric active. It is an alternative to the peer command
# above. Which you use depends on what you want to achieve.
# The syntax is:
# server addr [ key # ] [ version # ] [ minpoll interval_in_sec ]
# [ prefer ]
#
# server 128.8.10.1 key 2000 minpoll 6 prefer
server 192.168.10.55 #Primary
server 192.168.10.56 #Secondary
# Server: The server statement causes polling to be done in client mode rather
# than symmetric active. It is an alternative to the peer command
# above. Which you use depends on what you want to achieve.
# The syntax is:
# server addr [ key # ] [ version # ] [ minpoll interval_in_sec ]
# [ prefer ]
#
# server 128.8.10.1 key 2000 minpoll 6 prefer
server 192.168.10.55 #Primary
server 192.168.10.56 #Secondary
4. ntp daemon start 및 stop
/sbin/init.d/xntpd start|stop
* Server 역할 없이 Client 역할만 할 경우 ntpupdate를 cron에 등록하여 맞추는 것이 낫다.
# crontab -e
# ntpdate from time sync
13 * * * * /usr/sbin/ntpdate 192.168.10.55
# ntpdate from time sync
13 * * * * /usr/sbin/ntpdate 192.168.10.55
5. xntpd를 띄웠다면 ntpq 명령을 통해서 이를 확인해 볼 수 있다.
# ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
*192.168.10.55 .GPS. 1 u 2 64 377 14.37 -1.730 0.53
+192.168.10.56 .GPS. 1 u 40 64 377 8.41 -1.653 0.06
remote refid st t when poll reach delay offset disp
==============================================================================
*192.168.10.55 .GPS. 1 u 2 64 377 14.37 -1.730 0.53
+192.168.10.56 .GPS. 1 u 40 64 377 8.41 -1.653 0.06
'Operating System > HP-UX' 카테고리의 다른 글
| NTP 설정 (0) | 2010/10/15 |
|---|