Differences between current version and revision by previous author of NTPNotes.
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 4 | Last edited on Monday, October 15, 2007 10:02:12 pm | by AristotlePagaltzis | |
Older page: | version 2 | Last edited on Monday, October 15, 2007 1:29:10 pm | by IanMcDonald | Revert |
@@ -1,27 +1,29 @@
-!!Install the
NTP daemon (
Debian/Ubuntu)
+!! Setting up
NTP on
Debian/Ubuntu
-*sudo aptitude install ntp
+You need to:
-Now use your favorite text editor to add
the [NTPServers] you wish
to synchronize your clock
with:
+# Install
the [NTP] dæmon ([Package] <tt>ntp</tt> in [Debian] and friends).
+# Pick some
[NTPServers] to synch
with.
+# If necessary, fix your system time.
+# Start the dæmon.
-*echo "server nz.pool.ntp.org" >> /etc/ntp.conf
+All in all:''''
-If the time on the local server is very different from that of its primary time server your [NTP] daemon will eventually terminate, so we will first set the system time based on the time reported by the NTP
server.
+ <pre>
+ aptitude install ntp
+ /etc/init.d/ntp stop
+ echo '
server ''nz.pool.ntp.org''~' >> /etc/ntp.conf
+ ntpdate ''nz.pool.ntp.org'' # optional
+ /etc/init
.d/ntp start
+ </pre>
-Stop
the NTP daemon:
+Of course you would actually use a TextEditor to add
the [NTPServers] to <tt>/etc/ntp.conf</tt>, and you would use whichever server is appropriate in place of <tt>nz.pool.ntp.org</tt>.
-*sudo
/etc/init
.d/ntp stop
+The [ntpdate(8)] step is necessary only if your local clock is way off from the time server’s time, in which case the [NTP] dæmon may terminate. Note that even [ntpdate(8)] adjusts the time only gradually if within a certain time range – if you don't want that, use the <tt>-b<
/tt> option
.
-Now run ntpdate
+!! See also
-*sudo ntpdate nz.pool.ntp.org
+* TimeNotes
-NB Even [ntpdate(8)] gradually adjusts the time if within a certain time range. If you don't want this behaviour use the -b option.
-
-Now you can start the daemon
-
-*sudo /etc/init.d/ntp start
-----
-See also TimeNotes
----
CategoryNotes