Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / ntp / html / build.htm
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <html>
3 <head>
4 <meta name="generator" content="HTML Tidy, see www.w3.org">
5 <title>Building and Installing the Distribution</title>
6 </head>
7 <body>
8 <h3>Building and Installing the Distribution</h3>
9
10 <img align="left" src="pic/beaver.gif" alt="gif"><a href=
11 "http://www.eecis.udel.edu/~mills/pictures.htm">from <i>Pogo</i>,
12 Walt Kelly</a> 
13
14 <p>For putting out compiler fires.<br clear="left">
15 </p>
16
17 <hr>
18 <h4>Building and Installing the Distribution</h4>
19
20 <p>As a practical matter, every computer architecture and operating
21 system version seems to be different than any other. The device
22 drivers may be different, the input/output system may be
23 idiosyncratic and the libraries may have different semantics. It is
24 not possible in a software distribution such as this one to support
25 every individual sysdtem with a common set of binaries, even with
26 the same system but different versions. Therefore, it is necessary
27 to configure each system individually for each system and version,
28 both at compile time and at run time. In almost all cases, these
29 procedures are completely automatic and all the newbie user need do
30 is type "make" and the autoconfigure system does the rest. There
31 are some exceptions, as noted below.</p>
32
33 <p>Some programs included in this distribution use cryptographic
34 algorithms to verify server authenticity and credentials. As
35 required by the International Trade in Arms Regulations (ITAR), now
36 called the Defense Trade Regulations (DTR), certain cryptographic
37 products and media, including the Data Encryption Standard (DES),
38 cannot be exported without per-instance license. For this reason,
39 the DES encryption routine has been removed from the the current
40 version, even though it is used only to compute a message digest.
41 Current DTR regulations allow export of the the MD5 message digest
42 routine, which is in fact the preferred algorithm, and this is
43 included in the current version.</p>
44
45 <p>The NTP authentication routines conform to the interface used by
46 RSA Laboratories in the <tt>rsaref20.zip</tt> package, which was
47 formerly downloadable from <tt>ftp.rsa.com</tt> or via the web at
48 <tt>www.rsa.com</tt>, but this may no longer be the case. Outside
49 the US and Canada, the functionally identical <tt>rsaeuro.zip</tt>
50 package is available from J.S.A. Kapp and other sources. The
51 recommended way to integrate the routines in either package with
52 the NTP build procedures is to uncompress and extract the <tt>
53 rsaref20</tt> files in a top level directory with that name. Then
54 install a link to that directory from <tt>rsaref2</tt> in the top
55 level directory of the distribution. Use <tt>rsaeuro1</tt> instead
56 for that distribution. These steps must be completed
57 before the configuration process described below.</p>
58
59 <h4>Building and Installing under Unix</h4>
60
61 Make sure that you have all necessary tools for building
62 executables. These tools include <tt>cc/gcc, make, awk, sed, tr,
63 sh, grep, egrep</tt> and a few others. Not all of these tools exist
64 in the standard distribution of modern Unix versions (compilers are
65 likely to be an add-on product - consider using the GNU tools and
66 <tt>gcc</tt> compiler in this case). For a successful build, all of
67 these tools should be accessible via the current path. 
68
69 <p>The first thing to do is uncompress the distribution and extract
70 the source tree. Use the <tt>./configure</tt> command to perform an
71 automatic configuration procedure. This command inspects the
72 hardware and software environment and tests for the presence of
73 system header files and the contents of these files to determine if
74 certain features are present. When one or more of these features
75 are present, the code is compiled to use them; if not, no special
76 code is compiled. However, even if the code is compiled to use
77 these features, the code does a special test at run time to see if
78 one or more are actually present and avoids using them if not
79 present. In such cases a warning message is sent to the system log,
80 but the daemon should still work properly.</p>
81
82 <p>The default build normally includes the debugging code, which
83 can be useful in diagnosing problems found in initial test, and all
84 reference clock drivers known to work with each machine and
85 operating system. Unless memory space is at a premium, this is a
86 sensible strategy and saves lots of messy fiddling. If you need to
87 delete either the debugging code or one or more or all reference
88 clock drivers to save space, see the <a href="config.htm">
89 Configuration Options</a> page.</p>
90
91 <p>If your site supports multiple architectures and uses NFS to
92 share files, you can use a single source tree to compile
93 executables for all architectures. While running on a target
94 architecture machine and with the distribution base directory
95 active, create a subdirectory using a command like <tt>mkdir
96 A.`config.guess`</tt>, which will create an architecture-specific
97 directory with name peculiar to the architecture and operating
98 system. Then change to this directory and configure with the <tt>
99 ../configure</tt> command. The remaining steps are the same whether
100 building in the base directory or in the subdirectory.</p>
101
102 <h4>Compilation</h4>
103
104 Peruse the operating-system-specific information for your
105 architecture under <a href="hints.htm">Hints and Kinks</a>. 
106
107 <p>Use the <tt>make</tt> command to compile all source modules,
108 construct the libraries and link the distribution. Expect few or no
109 warnings using <tt>cc</tt> and a moderate level of warnings using
110 <tt>gcc</tt>. Note: On some Unix platforms the use of <tt>gcc</tt>
111 can result in quite a few complaints about system header files and
112 type inconsistencies, especially about pointer variables. This is
113 usually the case when the system header files are not up to ANSI
114 standards or <tt>gcc</tt>-isms, when gcc is not installed properly,
115 or when operating system updates and patches are applied and gcc is
116 not reinstalled. While the autoconfigure process is quite thorough,
117 the Unix programming cultures of the various workstation makers
118 still remain idiosyncratic.</p>
119
120 <h4>Installation</h4>
121
122 As root, use the <tt>make install</tt> command to install the
123 binaries in the destination directory. You must of course have
124 write permission on the install in the destination directory. This
125 includes the following programs: 
126
127 <ul>
128 <li><a href="ntpd.htm"><tt>ntpd</tt> - Network Time Protocol (NTP)
129 daemon</a></li>
130
131 <li><a href="ntpq.htm"><tt>ntpq</tt> - standard NTP query
132 program</a></li>
133
134 <li><a href="ntpdc.htm"><tt>ntpdc</tt> - special NTP query
135 program</a></li>
136
137 <li><a href="ntpdate.htm"><tt>ntpdate</tt> - set the date and time
138 via NTP</a></li>
139
140 <li><a href="ntptrace.htm"><tt>ntptrace</tt> - trace a chain of NTP
141 servers back to the primary source</a></li>
142 </ul>
143
144 <p>If the precision time kernel modifications are present, the
145 following program is installed:</p>
146
147 <ul>
148 <li><a href="ntptime.htm"><tt>ntptime</tt> - read kernel time
149 variables</a></li>
150 </ul>
151
152 <p>If the public key authentication functions are present, the
153 following program is installed:</p>
154
155 <ul>
156 <li><a href="genkeys.htm"><tt>ntp-genkeys</tt> - generate public
157 and private keys</a></li>
158 </ul>
159
160 <p>In some systems that include the capability to edit kernel
161 variables, the following program is installed:</p>
162
163 <ul>
164 <li><a href="tickadj.htm"><tt>tickadj</tt> - set time-related
165 kernel variables</a></li>
166 </ul>
167
168 <h4>Configuration</h4>
169
170 <p>You are now ready to configure the daemon and start it. You will
171 need to create a NTP configuration file <tt>ntp.conf</tt> and
172 possibly a cryptographic key file <tt>ntp.keys</tt>. Newbies should
173 see the <a href="quick.htm">Quick Start</a> page for orientation.
174 Seasoned veterans can start with the <a href="ntpd.htm"><tt>
175 ntpd</tt> - Network Time Protocol (NTP) daemon</a> page and move on
176 to the specific configuration option pages from there. A tutorial
177 on NTP subnet design and configuration options is in the <a href=
178 "notes.htm">Notes on Configuring NTP and Setting up a NTP
179 Subnet</a> page.</p>
180
181 <h4>If You Have Problems</h4>
182
183 <p>If you have problems peculiar to the particular hardware and
184 software environment (e.g. operating system-specific issues),
185 browse the <a href="hints.htm">Hints and Kinks</a> page. For other
186 problems a tutorial on debugging technique is in the <a href=
187 "debug.htm">NTP Debugging Technique</a> page. As always, the first
188 line of general assistance is the <a href="http://www.ntp.org">NTP
189 web site www.ntp.org</a> and the FAQ resident there. Requests for
190 assistance of a general nature and of interest to other timekeepers
191 should be sent to the NTP newsgroup. Bug reports of a specific
192 nature should be sent to <a href="mailto:bugs@mail.ntp.org">
193 &lt;bugs@mail.ntp.org&gt;</a>. Bug reports of a specific nature on
194 features implemented by the programmer corps mentioned in the <a
195 href="copyright.htm">Copyright</a> page should be sent directly to
196 the implementor listed in that page, with copy to
197 bugs@mail.ntp.org.</p>
198
199 <p>Please include the version of the source distribution (e.g.,
200 ntp-4.0.70a) in your bug report, as well as billboards from the
201 relevant utility programs and debug trace, if available. Please
202 include the output of <tt>config.guess</tt> in your bug report. It
203 will look something like:</p>
204
205 <p><tt>pdp11-dec-fuzzos3.4</tt></p>
206
207 <p>Additional <tt>make</tt> commands</p>
208
209 <dl>
210 <dt><tt>make clean</tt></dt>
211
212 <dd>Cleans out object files, programs and temporary files.</dd>
213
214 <dt><tt>make distclean</tt></dt>
215
216 <dd>Does the work of <tt>clean</tt>, but cleans out all directories
217 in preparation for a new distribution release.</dd>
218
219 <dt><tt>make dist</tt></dt>
220
221 <dd>Does the work of <tt>make distclean</tt>, but constructs
222 compressed tar files for distribution. You must have GNU automake
223 to perform this function.</dd>
224 </dl>
225
226 <h4>Building and Installing under Windows NT</h4>
227
228 See <tt><a href="hints/winnt.htm">hints/winnt.htm</a></tt> for
229 directions to compile the sources and install the executables. 
230
231 <hr>
232 <a href="index.htm"><img align="left" src="pic/home.gif" alt=
233 "gif"></a> 
234
235 <address><a href="mailto:mills@udel.edu">David L. Mills
236 &lt;mills@udel.edu&gt;</a></address>
237 </body>
238 </html>
239