|Source Repository:||Repository:Gentoo Portage Tree|
Summary: Network Time Protocol suite/programs
- Allow ntp to be installed alongside openntpd
- Add support for PARSE clocks
- Provide support for Samba's signing daemon (needed for Active Directory domain controllers)
New Squeezelite EbuildSqueezelite streams audio from Logitech Media Server, supporting FLAC, MP3, and hi-res DSD (SACD) formats.
New Raspberry Pi and ODROID buildsWe now have builds that are optimized for various Raspberry Pi and ODROID systems.
To install the NTP client and server, run the following command:
# emerge net-misc/ntp
The ntp-client command immediately synchronizes your clock, and has separate ntp sync settings from the daemon:
NTPCLIENT_OPTS="-s -b -u \ 0.pool.ntp.org 1.pool.ntp.org \ 2.pool.ntp.org 3.pool.ntp.org"
The ntpd server is also an ntp-client of upstream servers. Ntpd continuously, and gradually synchronizes the local clock.
# Pools for Gentoo users server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org server 3.pool.ntp.org
If you are interested only in synchronizing your local clock against servers, then only add
ntp-client to your list of services to start at boot:
# rc-updated add ntp-client
After adding the
ntp-client service to the
default runlevel, the service can be started by executing the
rc command as root:
# rc * Setting the clock via the NTP client 'ntpdate' ... [ OK ]
Executing the above command normally takes several seconds
If you are instead interested in running an NTP server, add
ntpd to your list of services to execute at boot:
# rc-update add ntpd
ntpd serves as both a client and a server
To write your NTP sync time to the hardware at shutdown, and read hw clock at start.
# echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock # echo 'clock_systohc="YES"' >> /etc/conf.d/hwclock # rc-service hwclock restart # rc-update add hwclock boot