Difference between revisions of "NTP"
(I added the "Additional Configuration Options" section.) |
(I added configuration information.) |
||
Line 7: | Line 7: | ||
---- | ---- | ||
− | == | + | == Introduction to NTP == |
− | 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. | + | 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. |
+ | |||
+ | '''Project Home Page''': http://www.ntp.org/ | ||
== Dependencies == | == Dependencies == | ||
Line 96: | Line 98: | ||
== Configuring == | == Configuring == | ||
+ | |||
+ | === Configuration File === | ||
+ | |||
+ | /etc/ntp.conf | ||
+ | |||
+ | === Configuration Information === | ||
+ | |||
+ | You will need to create an ntp.conf file so that ntp knows where to go find ntp servers from which it can get the current time. Here is a sample ntp.conf file suitable for the United States: | ||
+ | |||
+ | cat > /etc/ntp.conf << "EOF" | ||
+ | server 0.us.pool.ntp.org | ||
+ | server 1.us.pool.ntp.org | ||
+ | server 2.us.pool.ntp.org | ||
+ | driftfile /var/cache/ntp.drift | ||
+ | EOF | ||
+ | |||
+ | Of course, if you live elsewhere, you are going to want to list servers closer to home - though ntp should be able to work just fine with any server that you choose. A list of servers can be found at http://www.pool.ntp.org/. Just click on your continent on the right and you'll find your way to a list of servers for your area. You can then replace the ''server ....'' lines with servers closer to home. | ||
+ | |||
+ | The ntp.drift file allows ntp to compute the error in the intrinsic frequency of the clock on the computer it is running on, helping to keep the time on the computer correct. | ||
+ | |||
+ | Also, if you want more detailed documentation, have a look at http://www.ntp.org/. | ||
=== Bootscript === | === Bootscript === | ||
Line 102: | Line 125: | ||
make install-ntp | make install-ntp | ||
− | ln - | + | |
− | ln - | + | Link over clfs-bootscripts' setclock script so that the hardware clock is set when the computer shuts down or reboots. |
+ | |||
+ | ln -svf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock && | ||
+ | ln -svf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock |
Revision as of 22:23, 8 January 2007
Download Source: | http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.8p10.tar.gz |
---|
Contents
Introduction to NTP
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.
Project Home Page: http://www.ntp.org/
Dependencies
Optional
Additional Configuration Options
--with-crypto: Enables OpenSSL support.
Non-Multilib
Silc-toolkit provides a md5.h that is incompatible with NTP. Add the following entry to config.cache to make sure the header isn't used:
echo "ac_cv_header_md5_h=no" > config.cache
Compile the package:
./configure --prefix=/usr --bindir=/usr/sbin \ --sysconfdir=/etc --cache-file=config.cache && make
Install the package
make install install -dv -m755 /usr/share/doc/ntp-4.2.8p10 && cp -Rv html /usr/share/doc/ntp-4.2.8p10/
Multilib
This package does not provide any libraries so only one installation is needed.
32Bit
Silc-toolkit provides a md5.h that is incompatible with NTP. Add the following entry to config.cache to make sure the header isn't used:
echo "ac_cv_header_md5_h=no" > config.cache
Compile the package:
CC="gcc ${BUILD32}" USE_ARCH=32 ./configure --prefix=/usr \ --bindir=/usr/sbin --sysconfdir=/etc --cache-file=config.cache && make
Install the package
make install && install -dv -m755 /usr/share/doc/ntp-4.2.8p10 && cp -Rv html /usr/share/doc/ntp-4.2.8p10/
N32
Silc-toolkit provides a md5.h that is incompatible with NTP. Add the following entry to config.cache to make sure the header isn't used:
echo "ac_cv_header_md5_h=no" > config.cache
Compile the package:
CC="gcc ${BUILDN32}" USE_ARCH=n32 ./configure --prefix=/usr \ --bindir=/usr/sbin --sysconfdir=/etc --cache-file=config.cache && make
Install the package
make install && install -dv -m755 /usr/share/doc/ntp-4.2.8p10 && cp -Rv html /usr/share/doc/ntp-4.2.8p10/
64Bit
Silc-toolkit provides a md5.h that is incompatible with NTP. Add the following entry to config.cache to make sure the header isn't used:
echo "ac_cv_header_md5_h=no" > config.cache
Compile the package:
CC="gcc ${BUILD64}" USE_ARCH=64 ./configure --prefix=/usr \ --bindir=/usr/sbin --sysconfdir=/etc --cache-file=config.cache && make
Install the package
make install && install -dv -m755 /usr/share/doc/ntp-4.2.8p10 && cp -Rv html /usr/share/doc/ntp-4.2.8p10/
Configuring
Configuration File
/etc/ntp.conf
Configuration Information
You will need to create an ntp.conf file so that ntp knows where to go find ntp servers from which it can get the current time. Here is a sample ntp.conf file suitable for the United States:
cat > /etc/ntp.conf << "EOF" server 0.us.pool.ntp.org server 1.us.pool.ntp.org server 2.us.pool.ntp.org driftfile /var/cache/ntp.drift EOF
Of course, if you live elsewhere, you are going to want to list servers closer to home - though ntp should be able to work just fine with any server that you choose. A list of servers can be found at http://www.pool.ntp.org/. Just click on your continent on the right and you'll find your way to a list of servers for your area. You can then replace the server .... lines with servers closer to home.
The ntp.drift file allows ntp to compute the error in the intrinsic frequency of the clock on the computer it is running on, helping to keep the time on the computer correct.
Also, if you want more detailed documentation, have a look at http://www.ntp.org/.
Bootscript
Install the init script provided by the blfs-bootscripts package:
make install-ntp
Link over clfs-bootscripts' setclock script so that the hardware clock is set when the computer shuts down or reboots.
ln -svf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock && ln -svf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock