Operating System - HP-UX
1753725 Members
4984 Online
108799 Solutions
New Discussion

how to config NTP in HP-UX

 
zhu Longlin
Honored Contributor

how to config NTP in HP-UX

å¦ ä½ å ¨ HP-UX é ç½® NTP server

å ¨hpï¼ uxé ç½®NTP serveræ ä¸¤ç§ æ å µï¼ ä¸ ç§ æ ¯ä»¥local server为NTP serverï¼ ä¸ ç§ ä»¥PUBLIC ç NTP server为SERVERï¼ ä¸ é ¢å å «è¯´æ ï¼
å 设:æ ¬å °æ server1ï¼ 172.22.22.1),server2(172.22.22.3),webä¸ ç public NTP server 为192.12.19.20;(web public NTP serverå ¯ä»¥å ¨http://www.eecis.udel.edu/~mills/ntp/clock1b.html
æ ¥å °ï¼ å ¯ä»¥ä»»æ é æ ©å ¶ä¸­ä¸ ä¸ªserverï¼ æ ¬å °ç å ·ä½ æ ¶é ´æ æ ¬å °ç æ ¶å ºè®¾å® å ³å® ï¼


ä¸ ã ä»¥æ ¬å °ä¸ å °æ å ¡å ¨server1为NTPserverç é ç½®æ ¹æ³ ï¼


1.é¦ å å ¨server1ä¸ å å¦ ä¸ æ ä½ ï¼
aã vi /etc/rc.config.d/netdaemons
å° export XNTPD0ï¼ 0æ ¹ä¸ºexport XNTPD=1ï¼

bã vi /etc/ntp.conf
å ¨æ å å  ä¸ ä¸ è¡ ï¼
server 172.22.22.1
fudge 127.127.1.1 stratum 10
driftfile /etc/ntp.drift

cã /etc/init.d/xntpd stop

dã /etc/init.d/xntpd start


2ã å ¨å®¢æ ·ç«¯æ ºå ¨server2ä¸ æ §è¡ ä»¥ä¸ æ ä½

aã vi /etc/rc.config.d/netdaemons
å° export NTPDATE_SERVER=æ ¹ä¸ºexport NTPDATE_SERVER="172.22.22.1"
å° export XNTPD0ï¼ 0æ ¹ä¸ºexport XNTPD=1ï¼

bã vi /etc/ntp.conf
å ¨æ å å  ä¸ ä¸ è¡ ï¼
server 172.22.22.1
fudge 127.127.1.1 stratum 10
driftfile /etc/ntp.drift

cã /etc/init.d/xntpd stop

dã /etc/init.d/xntpd start
æ³¨ï¼ æ ntpè¿ ç¨ å¿ é¡»å ¨serverç«¯å ¯å ¨6å é å å è¿ è¡ ï¼ å ¦å ä¼ æ ¥â No Server suitable for synchroniza
5 REPLIES 5
Sanjay Kumar Suri
Honored Contributor

Re: how to config NTP in HP-UX

This link:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=550229

is a thesis on NTP.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Simon Hargrave
Honored Contributor

Re: how to config NTP in HP-UX

zhu, I think you have a chinese character set enabled which means we can't really see what you're asking. the previous answers should hopefully point you to some useful resource though.
zhu Longlin
Honored Contributor

Re: how to config NTP in HP-UX

Thanks!It's a experience share.Sorry that I use Chinese.
In Hp-Ux ,we will meet some customer want to config NTP service using local or web NTP server,I will share these two ways:
suppose that we have two local servers:server1(172.22.22.1),server2(172.22.22.2),one web NTP server(192.12.19.20),this can get from web site:http://www.eecis.udel.edu/~mills/ntp/clock1b.html,you can select the one you like,the local time will be set correct according to your TIMEZONE
1.use local server as NTP server:
in NTP server:
a.vi /etc/rc.config.d/netdaemons
change export XNTPD0ï¼ 0-->export XNTPD0ï¼ 1;
bã vi /etc/ntp.conf
add three lines in the end:
server 172.22.22.1
fudge 127.127.1.1 stratum 10
driftfile /etc/ntp.drift
cã /etc/init.d/xntpd stop

dã /etc/init.d/xntpd start

Client:
aã vi /etc/rc.config.d/netdaemons
change export NTPDATE_SERVER=--->export NTPDATE_SERVER="172.22.22.1"
change export XNTPD0ï¼ 0-->export XNTPD0ï¼ 1;
bã vi /etc/ntp.conf
add three lines in the end:
server 172.22.22.1
fudge 172.22.22.1 stratum 10
driftfile /etc/ntp.drift
cã /etc/init.d/xntpd stop

dã /etc/init.d/xntpd start
noteï¼ the client ntp daemons must wait 6mins,or will appear the error info:â No Server suitable for synchronization foundâ

2.use public NTP server:
1ã vi /etc/rc.config.d/netdaemons
change export NTPDATE_SERVER=--->export NTPDATE_SERVER="192.12.19.20"
change export XNTPD0ï¼ 0--->export XNTPD=1ï¼

2ã vi /etc/ntp.conf
add three lines in the endï¼
server 192.12.19.20
fudge 192.12.19.20 stratum 0
driftfile /etc/ntp.drift

cã /etc/init.d/xntpd stop

dã /etc/i
Sanjay Kumar Suri
Honored Contributor

Re: how to config NTP in HP-UX

So it is your expereince. I have to add the following:

Client:
aã  vi /etc/rc.config.d/netdaemons
change export NTPDATE_SERVER=--->export NTPDATE_SERVER="172.22.22.1"
change export XNTPD0ï¼ 0-->export XNTPD0ï¼ 1;
bã  vi /etc/ntp.conf
add three lines in the end:
server 172.22.22.1
fudge 172.22.22.1 stratum 10
driftfile /etc/ntp.drift
cã  /etc/init.d/xntpd stop

In the above configuration for client following line in /etc/ntp.conf is not needed.

fud
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.