LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-19-2012, 05:24 AM   #1
raj47
Member
 
Registered: Jan 2011
Posts: 47

Rep: Reputation: 2
NTPD server and Client Setup


Hi There,

Hope everyone doing great!!

I'm linux admin looking for a perfect NTPD server setup.

I was looking everywhere including the NTP.ORG site it was not so clear to me.

Here is my topology for NTPD server(192.168.1.10) at PDT timezone
********************
NTPD server --> /etc/ntp.conf

For PDT - NEW_YORK
server 0.north-america.pool.ntp.org
server 1.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org
server 3.north-america.pool.ntp.org

******************

/etc/init.d/ntpd start

******************
On the Client(192.168.1.15)side --> vim /etc/ntp.conf

server 192.168.1.10

********************

But my client server shows date

Mon Mar 19 06:20:15 EDT 2012

When i issue with ntpdate SERVER it should automatically sync to PDT

But i'm still seeing at EDT instead of PDT..

Or Should i change it to manually by EDT to PDT then it will sync with SERVER whenever it requires ?

Please help me out

Thanks
Raj
 
Old 03-19-2012, 05:29 AM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

the server itself is configured Local Time zone (or this how-to),
so your EDT should be configured to PDT.

You can also check if it has clock configured as UTC or local

good luck

Last edited by lithos; 03-19-2012 at 05:32 AM.
 
Old 03-19-2012, 05:30 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
NTP has absolutely NOTHING to do with time zones. Timezone offsets are applied separately to the time source, which is globally consistent.
 
Old 03-19-2012, 06:09 AM   #4
raj47
Member
 
Registered: Jan 2011
Posts: 47

Original Poster
Rep: Reputation: 2
Hi All,

So do you want me to setup the client localtime to PDT then put crontab and it will sync with NTP server 192.168.1.10 ?


Thanks
Raj
 
Old 03-19-2012, 03:00 PM   #5
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Dehradun, Uttarakhand, India
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,413

Rep: Reputation: 303Reputation: 303Reputation: 303Reputation: 303
It would be helpful if you tell us the Linux distribution that you are using. Many distributions have GUI system administration applications. You would set up your NTP client software from within the appropriate application.

You can look for a time server in your timezone using the NTP project's web page at http://www.ntp.org.
 
Old 03-19-2012, 03:17 PM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Dehradun, Uttarakhand, India
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,413

Rep: Reputation: 303Reputation: 303Reputation: 303Reputation: 303
You can set the timezone using this command:

Code:
$ export TZ=PDT
$ date
Or you can correct it more by setting:
Syntax:
TZ=<timezone><hour offset from UTC><dst timezone>

Code:
$ export TZ=EST08PDT
$ date
For more reference look here.
 
1 members found this post helpful.
Old 03-20-2012, 12:16 AM   #7
raj47
Member
 
Registered: Jan 2011
Posts: 47

Original Poster
Rep: Reputation: 2
Hi,

All are Red-hat server

My SERVER stands in PDT

My CLIENT SERVER under EDT

Here i want to change(CLIENT) it by manually EDT to PDT then it will sync with SERVER ?

Thanks
Puspharaj
 
Old 03-20-2012, 04:56 AM   #8
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by raj47 View Post
....

Here i want to change(CLIENT) it by manually EDT to PDT then it will sync with SERVER ?

Thanks
Puspharaj
Yes, I think it should,
but try run first:
Code:
# ntpdate -b yourserverIP
then start/restart "ntpd" service.

Ntpdate will step the time to current NTP servers time (ntpdate )
regardless if it's clock is waaay behind or out of sync
opposite to "ntp" which slews the time slowly to match.

Last edited by lithos; 03-20-2012 at 04:58 AM.
 
Old 03-20-2012, 05:00 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
Quote:
Originally Posted by raj47 View Post
Hi,

All are Red-hat server

My SERVER stands in PDT

My CLIENT SERVER under EDT

Here i want to change(CLIENT) it by manually EDT to PDT then it will sync with SERVER ?

Thanks
Puspharaj
again, ntp is not related to timezones. Ideally I recommend keeping the hardware clock on UTC at all times and setting the timezone as normal in software, and then there's even less room for confusion
 
Old 03-20-2012, 06:55 AM   #10
raj47
Member
 
Registered: Jan 2011
Posts: 47

Original Poster
Rep: Reputation: 2
Chris,


NTP is just a sync package and do you want me to set the hwclock UTC 0.00 and let the time sync can be with server?

Thanks
Raj
 
Old 03-20-2012, 07:00 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
On my redhat based systems, i have /etc/sysconfig/clock defining:
Code:
UTC=true
ZONE="Europe/London"
So your NTP services all just maintain things trivially easily on UTC, and the local timezone is adjusted for the system separately.
 
  


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
[SOLVED] Client-Terminal/Application Server-Data Server Setup? mobius129a Linux - Server 4 12-10-2011 03:33 AM
ntpd setup depam Linux - Networking 4 10-12-2005 01:06 PM
How to setup a NTPD server hanava Linux - General 0 05-05-2004 12:02 PM
NTPD on a Linux server with SCO Unix client. hanava Linux - Newbie 3 05-03-2004 06:15 PM
'Client-only' ntpd Mephistopholes Linux - Networking 2 02-18-2002 02:27 PM


All times are GMT -5. The time now is 10:17 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration