The NTP package contains a client and server to keep the time synchronized between various computers over a network. This package is the official reference implementation of the NTP protocol.
Download (HTTP): http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.0.tar.gz
Download (FTP): ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-4.2.0.tar.gz
Download MD5 sum: 0f8fabe87cf54f409b57c6283f0c0c3d
Download size: 2.4 MB
Estimated disk space required: 27 MB
Estimated build time: 0.53 SBU
Install NTP by running the following commands:
./configure --prefix=/usr --bindir=/usr/sbin \
--sysconfdir=/etc &&
make &&
make install
The following configuration file defines various NTP stratum 2 servers with open access from different continents. It also creates a drift file where ntpd stores the frequency offset. Since the documentation included with the package is sparse, visit the NTP website at http://www.ntp.org/ for more information.
cat > /etc/ntp.conf << "EOF" # Africa server tock.nml.csir.co.za # Asia server ntp.shim.org # Australia server ntp.saard.net # Europe server ntp.tuxfamily.net # North America server clock.psu.edu driftfile /var/cache/ntp.drift EOF
There are two options. Option one is to run ntpd continuously and allow it to synchronize the time in a gradual manner. The other option is to run ntpd periodically (using cron) and update the time each time ntpd is scheduled.
If you choose Option one, then install the /etc/rc.d/init.d/ntp init script included in the blfs-bootscripts-6.0 package.
make install-ntp
If you prefer to run ntpd periodically, add the following command to root's crontab:
ntpd -q
Execute the following command if you would like to set the hardware clock at shutdown and reboot based on the current system time:
ln -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &&
ln -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock
The other way around is already set up by LFS.
The NTP package contains ntp-wait, ntptrace, ntpd, ntpdate, ntpdc, ntpq, ntptime, tickadj and ntp-keygen.
ntpd is a NTP daemon that runs in the background and keeps the date and time synchronized based on response from configured NTP servers. It also functions as a NTP server.
ntpdate is a client program that sets the date and time based on the response from an NTP server. This command is deprecated.
ntpdc is used to query the NTP daemon about its current state and to request changes in that state.
tickadj reads, and optionally modifies, several timekeeping-related variables in older kernels that do not have support for precision timekeeping.
Last updated on 2005-02-11 08:57:40 -0700