Solved

How to sync time in linux LAN

Posted on 2007-03-27
7
3,255 Views
Last Modified: 2013-12-16
Peace be upon you all
I have no time to spend with searching old answers so how i can synchoronize 3 linux server times.
In simple steps.
0
Comment
Question by:mukhtar2t
7 Comments
 
LVL 4

Expert Comment

by:freaky_NL
ID: 18798841
You need to install ntpd and configure it. It quite simple actually.

You could also setup a cron job to run 'ntpdate -s eu.pool.ntp.org' every so often to sync the time. The daemon (ntpd) is the preferred way tho'.

You provide very little information on distribution and such, therefore I'll leave it up to you to search for docs on your distribution. Almost every distribution has docs on this and almost everyone handles configuration and installation differently
0
 
LVL 1

Expert Comment

by:iamgibbon
ID: 18798850
command line interface guide to setting ntp servers in linux environment can be found here: http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch24_:_The_NTP_Server
hth.
0
 
LVL 4

Expert Comment

by:freaky_NL
ID: 18798854
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 4

Author Comment

by:mukhtar2t
ID: 18798859
Hello freaky_NL
what is information you need to guide me
0
 
LVL 4

Expert Comment

by:freaky_NL
ID: 18798886
Atleast knowing your distribution would be nice.
0
 
LVL 4

Author Comment

by:mukhtar2t
ID: 18798892
Linux main 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux
0
 
LVL 5

Accepted Solution

by:
suggestionstick earned 500 total points
ID: 18799280
Hi

What Freaky_Nl is looking for is your distribution name for example: redhat enterprise linux 4 or debian sarge or fedora 6

The general ntp guideline is that you sync one of your linux servers against a public time server and then use this ntpd server to sync your other servers time.

Checkout http://www.pool.ntp.org/ for available time servers.

If you can supply us with a distribution we can give you a more detailed install guide, however I have listed a general conf for ntpd below. It's split into 2 sections one conf for the main time server and another for the 2 ntp clients.

a ntpd.conf for your main linux ntp server

# default restrictions
restrict default noquery notrust nomodify

# override the default restrictions here for your other 2  Linux server boxes
restrict  1.2.3.4 mask 255.255.255.255 nomodify  
restrict  1.2.3.5 mask 255.255.255.255 nomodify

# public NTP servers to sync with
server Public-timeserver1
server Public-timeserver2

restrict Public-timeserver1 noquery nomodify
restrict Public-timeserver2 noquery nomodify


# NTP drift file - used to keep track of your system clocks
# time deviation
driftfile /etc/ntp.drift

# NTP log file
logfile /var/log/ntp.log


example config file for your other linux boxes


# default restrictions
restrict default noquery notrust nomodify

# Permit all access over the loopback interface
restrict 127.0.0.1

# public NTP servers to sync with
server FQDN-of-your primary-ntp-server


restrict  FQDN-of-your primary-ntp-server noquery nomodify

# NTP drift file - used to keep track of your system clocks
# time deviation
driftfile /etc/ntp.drift

# NTP log file
logfile /var/log/ntp.log




Trev
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Ubuntu/Asterisk after upgrade Wav issue 19 54
Linux Scripting 3 97
Anti-virus for Linux Server 15 124
How to have a cron job run until a condition is met 12 54
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now