LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 07:36 PM   #1
checkmate3001
Member
 
Registered: Sep 2007
Location: Folsom, California
Distribution: Debian 4.0 (Etch), Debian 5.0 (Lenny), Ubuntu 8.04
Posts: 301

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
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 04:46 PM
NTP time servers with Suse 10.2 sadiqdm Suse/Novell 0 03-18-2007 12:35 AM
Network Time protocol ssg14j Linux - Networking 3 10-26-2005 04:58 PM
Network Time Protocol (NTP): Are you sure it's working? mchirico LinuxQuestions.org Member Success Stories 0 06-12-2004 07:00 PM
Network Time Protocol (NTP) for RH 7.3 LinuxQuest01 Linux - General 1 01-15-2003 04:48 PM


All times are GMT -5. The time now is 02:36 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration