LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-18-2014, 04:28 AM   #1
Aashika
LQ Newbie
 
Registered: Sep 2014
Posts: 15

Rep: Reputation: Disabled
same time on two systems


hey,
is it possible to set same date and time in system1 and system2 with no internet on both of them.
time needs to be same in both systems even if not accurate then its ok.
is it possible??
 
Old 11-18-2014, 05:31 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,474

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Install ntpd on server1 and use ntpdate server1 on server2
 
Old 11-18-2014, 10:59 PM   #3
Aashika
LQ Newbie
 
Registered: Sep 2014
Posts: 15

Original Poster
Rep: Reputation: Disabled
i have installed ntpd on server 1, can you plz explain the steps that i have to perform in server2.
 
Old 11-19-2014, 01:52 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,474

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
run ntpdate server1 (using server1's name or ip address) on server2 in the cron of user root on a regular basis. I suggest hourly if your servers drift much.
 
Old 11-19-2014, 02:47 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
with no internet on either system, the answer is NO.
 
Old 11-19-2014, 02:59 AM   #6
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,474

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by ondoho View Post
with no internet on either system, the answer is NO.
As long as the servers are networked then it's a definite YES. There's absolutely NO need for internet access to do this.

My current production environment has around 40 servers that do not have internet access that are all taking their time from a central "local" time server.

The solution I suggested will keep the two servers at the same time, which is what the OP asked for. The OP did not ask that the times are accurate or synced to an authoritative time source:
Quote:
Originally Posted by Aashika View Post
time needs to be same in both systems even if not accurate then its ok.
 
1 members found this post helpful.
Old 11-20-2014, 12:11 AM   #7
Aashika
LQ Newbie
 
Registered: Sep 2014
Posts: 15

Original Poster
Rep: Reputation: Disabled
i tried ntpdate server1's ip on server2
its giving me an error "no suitable server for synchronization found"
hence i tried to ntpdate server3's ip instead of server1 to check if that works.. And it worked..
so why isn't server2 synchronizing with server1?
i even disabled the firewalls thinking that might be the problem.. but still not working
is there any other configuration that i might be missing?

---------- Post added 11-20-14 at 01:12 AM ----------

i tried ntpdate server1's ip on server2
its giving me an error "no suitable server for synchronization found"
hence i tried to ntpdate server3's ip instead of server1 to check if that works.. And it worked..
so why isn't server2 synchronizing with server1?
i even disabled the firewalls thinking that might be the problem.. but still not working
is there any other configuration that i might be missing?
 
Old 11-20-2014, 12:27 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
There could be several reasons such as:
ntp is not running.
ntp is not configured to listen for external clients.
ntp does not have a local time source i.e. fudge and or stratum is not set to a low number.

It would help if you post the ntp.conf.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to install operating system[os]-in all systems at a time connect2janu Linux - Laptop and Netbook 7 02-19-2012 06:07 PM
LXer: Operating systems that time forgot LXer Syndicated Linux News 0 02-07-2011 06:11 PM
LXer: Operating systems that time forgot LXer Syndicated Linux News 0 02-07-2011 05:50 PM
How to create file systems at run time rahulmishra1312 Linux - Newbie 8 04-17-2009 11:17 AM
Need some detail information on Hard Real-Time Systems and Soft real-Time Systems. LinuxInfo General 3 09-22-2008 03:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:59 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
Open Source Consulting | Domain Registration