LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NTPD server and Client Setup (https://www.linuxquestions.org/questions/linux-newbie-8/ntpd-server-and-client-setup-935248/)

raj47 03-19-2012 05:24 AM

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

lithos 03-19-2012 05:29 AM

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

acid_kewpie 03-19-2012 05:30 AM

NTP has absolutely NOTHING to do with time zones. Timezone offsets are applied separately to the time source, which is globally consistent.

raj47 03-19-2012 06:09 AM

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

Satyaveer Arya 03-19-2012 03:00 PM

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.

Satyaveer Arya 03-19-2012 03:17 PM

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.

raj47 03-20-2012 12:16 AM

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

lithos 03-20-2012 04:56 AM

Quote:

Originally Posted by raj47 (Post 4631201)
....

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.

acid_kewpie 03-20-2012 05:00 AM

Quote:

Originally Posted by raj47 (Post 4631201)
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

raj47 03-20-2012 06:55 AM

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

acid_kewpie 03-20-2012 07:00 AM

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.


All times are GMT -5. The time now is 07:37 PM.