Skip to content

How to be an NTP HardAss.

Was messing with NTP today and thought I would post.

 

#### STEP 1 #### Fix NTP Config

 

vi /etc/ntp.conf

 

Add our NTP Server and comment out the default.

 

server 10.127.10.15

server 10.127.10.25

#server 0.centos.pool.ntp.org

#server 1.centos.pool.ntp.org

#server 2.centos.pool.ntp.org

 

#### STEP 2 #### Set OS Clock

 

[root@localhost ~]# /etc/init.d/ntpd stop

Shutting down ntpd:                                        [  OK  ]

 

[root@localhost ~]# ntpdate 10.127.10.25

16 Oct 15:36:18 ntpdate[15298]: step time server 10.127.10.25 offset -17472.590443 sec

 

[root@localhost ~]# /etc/init.d/ntpd start

Starting ntpd:                                             [  OK  ]

 

#### STEP 3 #### Set Hardware Clock

 

/sbin/hwclock –systohc

 

Or

 

/sbin/hwclock –systohc –utc     (if the bios is set to UTC).

 

Published inLinuxTip of the day

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *