LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 01-20-2006, 05:44 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Rep: Reputation: 40
Synchronize time


I have four machines (Debian x3, Ubuntu) I want to synchronize by time. They are connected with a hub, and all have access to the Internet. Any ideas how this is done?
 
Old 01-20-2006, 07:24 AM   #2
zhelezov
Member
 
Registered: Jan 2006
Location: Bulgaria
Distribution: debian, grml, ubuntu
Posts: 69

Rep: Reputation: 15
hi, kenneho!

apt-get install ntp ntpdate and configure ntp to sync system clock with an apropriate to your TZ ntp server while ntpdate will adjust time at boot time.

cheers
vlado
 
Old 01-20-2006, 07:30 AM   #3
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Original Poster
Rep: Reputation: 40
Thanks, I'll give it a try. But is it possible to sync the machines without rebooting?
 
Old 01-20-2006, 07:34 AM   #4
zhelezov
Member
 
Registered: Jan 2006
Location: Bulgaria
Distribution: debian, grml, ubuntu
Posts: 69

Rep: Reputation: 15
no need to reboot -- ntp takes care refreshing time inbetween reboots....and here is an eg. server: time.alcanet.no

glad to!
 
Old 01-20-2006, 07:34 AM   #5
betrayed
LQ Newbie
 
Registered: Jul 2005
Location: Denver
Distribution: Debian testing/unstable
Posts: 17

Rep: Reputation: 0
ntpdate timeserver
just run that from root when ever you feel the need to sync time
 
Old 01-20-2006, 07:43 AM   #6
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Original Poster
Rep: Reputation: 40
Thanks for the replies. I'll give it a try, and hopefully it will work.
 
Old 01-20-2006, 07:56 AM   #7
zhelezov
Member
 
Registered: Jan 2006
Location: Bulgaria
Distribution: debian, grml, ubuntu
Posts: 69

Rep: Reputation: 15
found one more package -- chrony
 
Old 01-20-2006, 08:28 AM   #8
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Original Poster
Rep: Reputation: 40
For some reason I get the following error:

"(...)no server suitable for synchronization found"

I tried the server ntp.uio.no, but it doens't work. I can ping the server, but ntpdate gives me
the error above. I tried adding the -u option, but still no luck. Any ideas?
By the way, the main issue here is to synchronize the machines with each other, not necessarily with "the internet". So if it easier, I could set up a ntp server on one of the machines and have the other sync with that. But I don't know how this is done. I'm guessing its easier sync'ing with an already dedicated server.
 
Old 01-20-2006, 09:38 AM   #9
zhelezov
Member
 
Registered: Jan 2006
Location: Bulgaria
Distribution: debian, grml, ubuntu
Posts: 69

Rep: Reputation: 15
anyway, ntpdate will be deprecated soon while running a ntp daemon will be far more accurate and convenient cuz you could become a time_provider to your local subnet. consider installing ntp-simple -- the ntp.conf file you'll find in /etc is simple enough to set for minutes, and you have your ntpd sync'ing in the background.
Quote:
But I don't know how this is done
the ntp-doc package provides extensive documentation in html format if you happen to need it.

vlado

Last edited by zhelezov; 01-20-2006 at 09:39 AM.
 
Old 01-20-2006, 10:03 AM   #10
zhelezov
Member
 
Registered: Jan 2006
Location: Bulgaria
Distribution: debian, grml, ubuntu
Posts: 69

Rep: Reputation: 15
one more note -- the default ntp version used by ntpdate is 3. maybe you try using older one with the -o switch, like

ntpdate -o 2 some.ntp.server
 
Old 01-20-2006, 11:09 AM   #11
betrayed
LQ Newbie
 
Registered: Jul 2005
Location: Denver
Distribution: Debian testing/unstable
Posts: 17

Rep: Reputation: 0
ntpdate time.windows.com

works for me.
 
Old 01-21-2006, 05:08 AM   #12
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Original Poster
Rep: Reputation: 40
I give up for now. Can't get it to work. Have tried "ntpdate <server>" using several servers (including windows), have tried different options to ntpdate, have tried and set up my own server. The firewall-setting should be okay. I'm still getting the "no server suitable for synchronization found" error.

I think I'll put it aside for now, and have a go at it later. But thanks for the help anyways, guys!
 
  


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
synchronize time between linux and XP server taiwf Linux - General 1 11-03-2005 09:52 PM
synchronize linux domain time to workstation sunnyee Linux - Newbie 2 06-25-2004 04:37 AM
Tar and synchronize kaboom Linux - Software 4 12-12-2003 03:32 AM
Synchronize Password... chuck77 Linux - General 2 03-13-2002 10:29 AM
Synchronize Password... chuck77 Linux - General 1 03-13-2002 03:15 AM


All times are GMT -5. The time now is 12:44 PM.

Main Menu
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