?
Solved

How to sync time in linux LAN

Posted on 2007-03-27
7
Medium Priority
?
3,264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
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 2000 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

770 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