LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-05-2003, 10:53 AM   #1
Paulo Góes
Member
 
Registered: Feb 2003
Location: Rio de Janeiro - Brazil
Distribution: Slackware 11
Posts: 30

Rep: Reputation: 15
Synchronising servers' clocks


I have a database server (Postgresql 7.2) hosted in a machine and a Web server suporting a PHP 4 application hosted in another computer.
I need to synhronise them in order to have the same date and time in both machines. How can I do that automatically every time I turn them on?

Thanks in advance
 
Old 09-05-2003, 12:31 PM   #2
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
This is how I sync my desktop with my firewall:
------------------------------------------
ssh 10.0.23.1 /etc/init.d/ntpd start>/dev/null
sleep 305
/usr/sbin/ntpdate 10.0.23.1 >>/var/time.log 2>&1
/sbin/clock -w -u >>/var/time.log 2>&1
rm /etc/adjtime
/sbin/clock -w -u >>/var/time.log 2>&1

ssh 10.0.23.1 /etc/init.d/ntpd stop>/dev/null
------------------
Run that script on the client machine. In this case 10.0.23.1 is the machine running the server.
You have to do a key exchange for this to work.

Last edited by m0rl0ck; 09-05-2003 at 12:33 PM.
 
  


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
my clocks are weird boxerboy Fedora 9 08-07-2005 09:38 PM
Syncronize Clocks newuser455 Linux - Newbie 2 07-15-2005 08:23 PM
Synchronising two copies of one lot of files oneandoneis2 Linux - General 2 07-05-2005 08:21 AM
synchronising mp3 collections dukeinlondon Linux - Software 1 10-05-2004 05:15 PM
synchronising data c0c0deuz Linux - Software 4 08-19-2003 08:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:19 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