Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a CentOS 5.5 server that the clock is wrong on. I also have a pre-existing NTP server, but all of the info I can find is focused on setting up an NTP server, as opposed to linking to one. How do I do this please?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Edit /etc/ntp.conf to contain your NTP servers. I'll use ntp pool servers as an example.

server 0.uk.pool.ntp.org
server 1.uk.pool.ntp.org
server 2.uk.pool.ntp.org
server 3.uk.pool.ntp.org

Edit /etc/ntp/step-tickers. Note there is no word "server" unlike the above.

0.uk.pool.ntp.org

Edit /etc/sysconfig/ntpd -- do you want hardware sync and so on?

Start ntpd and fix any problems if it does not start cleanly: service ntpd start

Configure to start on boot: chkconfig ntpd on

share|improve this answer
    
Thank you, that seems to have sorted the NTP out. Now to go searching for a way to change the timezone, as it looks like it's on standard GMT, not taking account of DST in the UK. Thanks. –  David Gard Jul 13 '12 at 10:41
    
You might also want to tack an iburst onto the end of that first server line in ntp.conf. This gets the clock set more accurately quicker. Also the clock defaults to UTC (GMT without DST); this is great for a variety of things, especially coordinating log files or events across servers, even in different time zones. Plus, you get used to it pretty quick. –  Chris S Nov 15 '12 at 15:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.