2

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?

David Gard
  • 509
  • 3
  • 12
  • 20

1 Answers1

6

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

ramruma
  • 2,740
  • 1
  • 15
  • 8
  • 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