LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-16-2012, 09:58 PM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
Sync system time


I am in Sigapore , the time is GMT +8 , but my linux server time should be set to GMT time (GMT +0) , can advise what is the way that the server can syn with the GMT time accurately ?

I have nine linux servers need to sync with GMT time , the best way is sync with external time server or sync with local server and run script to subtract 8 hours ?

thx

Last edited by ust; 05-16-2012 at 11:22 PM.
 
Old 05-16-2012, 11:12 PM   #2
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Can you show us your /etc/ntp.conf configuration file?
 
Old 05-16-2012, 11:22 PM   #3
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Satyaveer Arya View Post
Can you show us your /etc/ntp.conf configuration file?
no such file in my redhat server.
 
Old 05-16-2012, 11:26 PM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
How could it be? The location of ntp.conf in redhat is under /etc/, anyways try to locate the file.

Code:
# locate ntp.conf
 
Old 05-16-2012, 11:36 PM   #5
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
This command will give you the path to ntp configuration file.

Quote:
rpm -ql ntp | grep -i conf
 
Old 05-16-2012, 11:40 PM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
You can sync with a time server in any location. It's best to choose ones that are near in network times to minimise differences (jitter) in packet transmission time over the network.

The task is made easy by the NTP pool project which coordinates time servers by regions. The Singapore pool (sg.pool.ntp.org) has five servers. The NTP pool project advises that is not enough so the Asia pool (asia.pool.ntp.org) should be used instead.

If you have an ntpd version that supports the pool directive (4.2.6p1 did, maybe earlier), /etc/ntp.conf can have:
Code:
pool asia.pool.ntp.org
My own ntpd.conf uses the Indian pool followed by the Asian pool. Maybe that's not good practice:
Code:
# Time sources
# ~~~~~~~~~~~~
# Using pool method from /usr/share/doc/ntp-4.2.6p1/html/manyopt.html#pool
# also at http://www.eecis.udel.edu/~mills/ntp/html/manyopt.html#pool

# For India
# (Asia also required because India is inadequate)
pool in.pool.ntp.org
pool asia.pool.ntp.org
Another factor to consider is the quality of network connections. Singapore might have better (= faster, lower latency, less jittery) network connections to say USA than to some of the servers in the asia.pool.ntp.org pool.
 
Old 05-16-2012, 11:48 PM   #7
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
no such file in my redhat server.
I think the ntp package is not installed on your machine, if I'm not wrong?
 
Old 05-17-2012, 02:35 AM   #8
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Satyaveer Arya View Post
I think the ntp package is not installed on your machine, if I'm not wrong?
I find the file /etc/ntp.conf.dpkg-new in my debian server , is it a configuration file for NTP ?
 
Old 05-17-2012, 02:57 AM   #9
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Sounds like it's a file left by dpkg when it upgraded ntp (rather than overwriting your initial ntp.conf).

This page describes how to change your time zone on an RHEL system. It is also highly recommended to install and run NTP to keep accurate time on your system.
 
Old 05-17-2012, 03:39 AM   #10
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
no such file in my redhat server.
This is from post no. 3
Quote:
I find the file /etc/ntp.conf.dpkg-new in my debian server
and this is from post no. 8

In which OS you're searching the file, RHEL or Debian?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to set and sync system time with time server?? servnov Linux - Newbie 6 12-03-2013 07:55 PM
NTP time sync with windows 2000 AD time csghosh Linux - Enterprise 7 02-24-2012 03:46 PM
Easiest way to sync system time between two servers? JohnRock Linux - Networking 3 06-06-2009 07:26 PM
Sync KDE/System Time w/ NTP carlosinfl Linux - General 6 03-15-2006 03:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:20 AM.

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