[ntp:questions] 3 Questions about setting up NTP

Ryan Malayter malayter at gmail.com
Tue Apr 8 15:49:32 UTC 2008

On Apr 7, 10:15 pm, unix2... at charter.net (unix2266) wrote:

> 1. I added the IP address for the NTP server to the "/etc/hosts" file on
> the Linux server. Is that all i need to do to make the Linux server point to the NTP server?

You don't need to mess with /etc/nosts unless you don't have access to
a properly functioning DNS server, or there is no DNS entry for the
NTP server. Can you do an "nslookup <NTPservername>" command? If that
works, you don't need anythingin /etc/hosts.

> 2. After pointing the Linux server to the NTP server, do i need to reboot the
> Linux server or restart any daemon on the Linux server? in other words, what
> do i need to do to make sure the changes i made in the "/etc/hosts" took affect?

You need to add a "server <NTPservername>" line to your ntpd.conf file
(without the brackets). Where that ntpd.conf file sits depends upon
your Linux distribution. Most recent Linux distributions already have
a default server line there for you that typically points to the
pool.ntp.org set of NTP servers on the internet.

After reconfiguring the ntpd.conf file, you need to restart NTPd. If
you don't know how to do that, restart the whole system.

>  3. Is there a way to test the NTP server to make sure it interact with the
> Linux server & will work fine if i have a timing issue on the Linux server?
> I want to test it so if something happens for real i don't look like a dummy

You can use the ntpq tool to monitor ntpd. Or you can use the ntpdate
command with the -D debug switch to just check to see if you can get
the time from the NTP server without actually setting the time on the
local system.

More information about the questions mailing list