Setting up NTP on Gentoo
The quick and dirty way. Source from carlos123 on the gentoo.org forums, changes by me to update
The following instructions will install the ntpd program. After following the instructions below your system time will automatically be kept accurate by ntpd. Which will synchronize your computer's time with that kept by a time server out on the Internet.
1. # emerge ntp
2. Find three timeservers from here.
Note: do NOT use a Stratum 1 server unless you are authorized to do so! Using at least three time servers will ensure that your time gets updated if any one or more of the three is not available at any one point in time.
3. # nano /etc/ntp.conf
Note: or use any other editor like vi, vim, emacs, etc..
4. Add "server
5. # nano /etc/conf.d/ntp-client
6. Uncomment the NTPCLIENT_OPTS="-b someserver" line.
7. Replace "someserver" with the domain name of one of the three servers you chose.
8. # /etc/init.d/ntp-client start
9. # rc-update add ntp-client default
10. # /etc/init.d/ntpd start
11. # rc-update add ntpd default
12. Verify that correct time was set by going to
http://tycho.usno.navy.mil/cgi-bin/timer.pl (for North American time zones only)
13. Verify that the time servers are being accessed by typing "ntpq -p" at the command prompt. You should see the time servers being contacted as output.
Discussion leading up to these instructions can be found at http://forums.gentoo.org/viewtopic.php?p=240688#240688. Thanks to forum member, cederberg, for the original idea and set of instructions on which the above are based.
If the above or any other instructions don't work check the ntpd log at /var/log/ntpd.log for additional insight as to possible reasons.
Posted by Divinity at August 5, 2004 07:02 PM