Note
The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Package:Ntp"
Jump to navigation
Jump to search
Threesixes (talk | contribs) m (throw updates template) |
Threesixes (talk | contribs) m |
||
Line 4: | Line 4: | ||
|Homepage=http://www.ntp.org/ | |Homepage=http://www.ntp.org/ | ||
}} | }} | ||
=== Installation === | === Installation === | ||
Line 13: | Line 12: | ||
=== Configuration === | === Configuration === | ||
==== Client ==== | ==== Client ==== | ||
The ntp-client command immediately synchronizes your clock, and has separate ntp sync settings from the daemon: | |||
{{file|name=/etc/conf.d/ntp-client|lang=|desc=setting ntp-client upstream servers|body= | |||
NTPCLIENT_OPTS="-s -b -u \ | |||
0.pool.ntp.org 1.pool.ntp.org \ | |||
{{ | 2.pool.ntp.org 3.pool.ntp.org" | ||
}} | }} | ||
==== Server ==== | ==== Server ==== | ||
The ntpd server is also an ntp-client of upstream servers. Ntpd continuously, and gradually synchronizes the local clock. | |||
{{file|name=/etc/ntp.conf|lang=|desc=setting ntpd upstream servers|body= | |||
# Pools for Gentoo users | |||
server 0.pool.ntp.org | |||
server 1.pool.ntp.org | |||
server 2.pool.ntp.org | |||
server 3.pool.ntp.org | |||
}} | |||
=== Runtime === | === Runtime === | ||
Line 32: | Line 37: | ||
###i## rc | ###i## rc | ||
}} | }} | ||
==== Hardware Clock ==== | |||
To write your NTP sync time to the hardware at shutdown, and read hw clock at start. | |||
{{console|body= | |||
###i## echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock | |||
###i## echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock | |||
###i## rc-service hwclock restart | |||
###i## rc-update add hwclock boot | |||
}} | |||
=== External Resources === | |||
http://keetweej.vanheusden.com/query_ntp.php | |||
{{EbuildFooter}} | {{EbuildFooter}} |
Revision as of 03:22, January 25, 2015
Ntp
Tip
We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.
Installation
root # emerge net-misc/ntp
Configuration
Client
The ntp-client command immediately synchronizes your clock, and has separate ntp sync settings from the daemon:
/etc/conf.d/ntp-client
- setting ntp-client upstream serversNTPCLIENT_OPTS="-s -b -u \ 0.pool.ntp.org 1.pool.ntp.org \ 2.pool.ntp.org 3.pool.ntp.org"
Server
The ntpd server is also an ntp-client of upstream servers. Ntpd continuously, and gradually synchronizes the local clock.
/etc/ntp.conf
- setting ntpd upstream servers# Pools for Gentoo users server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org server 3.pool.ntp.org
Runtime
root # rc-update add ntpd root # rc-update add ntp-client root # rc
Hardware Clock
To write your NTP sync time to the hardware at shutdown, and read hw clock at start.
root # echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock root # echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock root # rc-service hwclock restart root # rc-update add hwclock boot
External Resources
http://keetweej.vanheusden.com/query_ntp.php