Solved

How to sync time in linux LAN

Posted on 2007-03-27
7
3,253 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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,…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

759 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

18 Experts available now in Live!

Get 1:1 Help Now