LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices


Reply
  Search this Thread
Old 09-30-2007, 06:36 PM   #1
checkmate3001
Member
 
Registered: Sep 2007
Location: Folsom, California
Distribution: Ubuntu, Mint, Debian, Suse
Posts: 307

Rep: Reputation: 32
debian: Get time from ntp (network time protocol) servers


I wanted to get my time accurately set from a ntp server.
Turns out it is pretty dang easy.

Install ntp
apt-get install ntp
apt-get install ntp-doc (if you want it)

Check the list of available time servers and try to find one close by:
http://www.pool.ntp.org/
and then edit your /etc/ntp.conf file to include the servers you choose.

I happend to live in the U.S. so I edited ntp.conf and added/changed the servers to:
Quote:
server 0.us.pool.ntp.org iburst
server 1.us.pool.ntp.org iburst
server 2.us.pool.ntp.org iburst
server 3.us.pool.ntp.org iburst
I then purposely changed the time to the incorrect time:
Quote:
date -s 00:00:00
Then, to check it out and have it fix it I ran:
Quote:
/etc/init.d/ntp restart
Check the time:
date

Bam! It works.

Has anyone tried to run a ntp server themselves and gotten it working?

P.S. If your time is still off (by a nice round number of hours) you prolly have to make sure your timezone is set properly.
http://www.debian.org/doc/manuals/sy...tml#s-tzconfig
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NTP time sync with windows 2000 AD time csghosh Linux - Enterprise 7 02-24-2012 03:46 PM
NTP time servers with Suse 10.2 sadiqdm SUSE / openSUSE 0 03-17-2007 11:35 PM
Network Time protocol ssg14j Linux - Networking 3 10-26-2005 03:58 PM
Network Time Protocol (NTP): Are you sure it's working? mchirico LinuxQuestions.org Member Success Stories 0 06-12-2004 06:00 PM
Network Time Protocol (NTP) for RH 7.3 LinuxQuest01 Linux - General 1 01-15-2003 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration