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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-16-2012, 09:58 PM
|
#1
|
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130
Rep:
|
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.
|
|
|
05-16-2012, 11:12 PM
|
#2
|
Senior Member
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
|
Can you show us your /etc/ntp.conf configuration file?
|
|
|
05-16-2012, 11:22 PM
|
#3
|
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130
Original Poster
Rep:
|
Quote:
Originally Posted by Satyaveer Arya
Can you show us your /etc/ntp.conf configuration file?
|
no such file in my redhat server.
|
|
|
05-16-2012, 11:26 PM
|
#4
|
Senior Member
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
|
How could it be? The location of ntp.conf in redhat is under /etc/, anyways try to locate the file.
|
|
|
05-16-2012, 11:36 PM
|
#5
|
Member
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Rep:
|
This command will give you the path to ntp configuration file.
Quote:
rpm -ql ntp | grep -i conf
|
|
|
|
05-16-2012, 11:40 PM
|
#6
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
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.
|
|
|
05-16-2012, 11:48 PM
|
#7
|
Senior Member
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
|
Quote:
no such file in my redhat server.
|
I think the ntp package is not installed on your machine, if I'm not wrong?
|
|
|
05-17-2012, 02:35 AM
|
#8
|
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130
Original Poster
Rep:
|
Quote:
Originally Posted by Satyaveer Arya
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 ?
|
|
|
05-17-2012, 02:57 AM
|
#9
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
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.
|
|
|
05-17-2012, 03:39 AM
|
#10
|
Senior Member
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
|
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?
|
|
|
All times are GMT -5. The time now is 08:20 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|