[clug] Local NTP server?
Andrew Janke
a.janke at gmail.com
Tue Dec 23 06:43:35 GMT 2008
> OK, I tried openntpd on the server:
>
> sudo apt-get remove --purge ntp && sudo apt-get install openntpd
Ah, good good.. :)
> Then I edited /etc/default/openntpd and uncommented the '-s' option, told it
> to listen on all interfaces and restarted the deamon.
> netstat shows that ntpd is listening and ps shows that it's running (two
> instances, one as root, one as ntpd). As an aside, when I add the -s it does
> take an awefully long time to start, but without -s it's almost
> instantaneous.
Yup, with the -s it will sync to a server and then _set_ the time
irrespective. I generally dont set the -s option on a machine unless
it has a known wobbly clock.
> OK, onto the client now:
>
> sudo apt-get remove --purge ntp
> sudo ntpdate 192.168.20.40
openntpd doesn't like to play games as a server unless it itself is in
sync first, monitor the syslog for a bit and when it is happy then try
to sync a client.
In my case I generally get the "master" machine working all hunky-dory
(can take a few hours to sync up unless I play games with rdate on
boot) and then start pointing clients at it. You should also have
something like:
listen on 192.168.20.40
in /etc/openntpd/ntpd.conf on the server.
And then
server 192.168.20.40
on the clients, although I reckon you have done this already... :)
Once I have my master working nicely by cfengine install script that
"mashes" a machine into shape upon first boot after an automated
install on "my" network first calls rdate and then installs openntpd.
a
More information about the linux
mailing list