Solved

How to sync time in linux LAN

Posted on 2007-03-27
7
3,263 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
Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

688 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