Polls

Topics

Synchronize the system clock to Network Time Protocol (NTP) under Fedora or Red Hat Linux

Posted by Vivek on Friday May 5, 06 @2:02 pm

The Network Time Protocol daemon (ntpd) program is a Linux operating system daemon. It sets and maintains the system time of day in synchronism with time servers (Mills).

You need to configure ntpd via /etc/ntp.conf configuration file. The file is well documented and you easily configure it.

Install ntpd

If ntpd is not installed use any one of the following command to install ntpd:
# yum install ntpOR# up2date ntp

Configuration

You should at least set following parameter in /etc/ntp.conf config file:
server <Time Server Name or IP Address>

For example, open /etc/ntp.conf file using vi text editor:
# vi /etc/ntp.conf
Locate server parameter and set it as follows:
server pool.ntp.org

Save the file and restart the ntpd service:
# /etc/init.d/ntpd start

You can synchronize the system clock to an NTP server immediately with following command:
# ntpdate pool.ntp.org
Output:

 5 May 14:36:01 ntpdate[5257]: adjust time server 61.206.115.3 offset -0.343242 sec

Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or full RSS feed to get all updates. You can Email this page to a friend.

You may also be interested in...

Discussion on This Article:

  1. cool mind Says:

    Time is not updated through asia.pool.ntp.org. Any other server that can be configured in /etc/ntpd.conf. Please suggest

  2. nixcraft Says:

    Goto -> http://www.pool.ntp.org/ and select the server you want :)

  3. yellanna Says:

    Iam unable to syn two systems time between redhat 7 and redhat enterprise 4.
    Is there any please reply.

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

~ Last updated on: November 9, 2006

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.