this is my some tips when i configure ntp server on fedora OS.
Step one:
You need make sure your OS have installed NTP page, you can use the command:
rpm –q ntp
To make sure weather ntp package has been installed, if not you will install NTP package
yum install ntpdate
Step two:
You need to change some configure in /etc/ntp.conf, as a ntp client we need only focus on this format sentence to configure permission as follow:
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
restrict 10.239.128.0 mask 255.255.255.0 nomodify notrap
after the key word restrict, follows our client machine network segment and mask, for example strago2 and haps is 10.239.128.0
the parameter nomdofiy means client can synchronous NTP server time but can’t modify NTP server time, and the parameter notrap means we don’t offer trap telnet login.
Tips: you can create /etc/ntp.conf only with this two sentence, it works well
Step three:
Now, we need to synchronous our machine to NTP server, you can find an available NTP server on Internet, but there will be two questions, first, our NTP protocol 123 port maybe done by our firewall , second, we maybe grant by out router, so we can’t receive date form NTP server.
So the best choose we synchronous Intel’s NTP server, it seems our windows 7 synchronous that server. You can check with windows, start cmd, and
net time
it will show our windows synchronous a NTP server, for example SHSCCR201.ccr.crop.intel.com
So we can choose SHSCCR201.ccr.corp.intel.com as NTP server, next,
ntpdate SHSCCR201.ccr.corp.intel.com
Step four:
Need to write synchronous time to hardware, use command
hwclock –w
And we need synchronous NTP time often, make sure can adjust regularly, so I need synchronous NTP everyday 8:30 morning.
vi /etc/crontab
Add the tail
30 8 * * * root /usr/sbin/ntpdate SHSCCR201.ccr.corp.intel.com; /sbin/hwclock –w