BSD 2 release
[unix-history] / install.ms
CommitLineData
de2ed840
BJ
1.if n .nr LL 7i
2.TL
3Second\ Distribution\ of\ Berkeley\ Software\ for\ UNIX\(dg
4.sp
5Installation\ Instructions
6.PP
7.FS
8\(dg UNIX is a trademark of Bell Laboratories.
9.FE
10By following the directions here you
11should be able to bring up the software on the tape in a very short
12period of time, ranging from an hour (if you have a standard version 6
13system and can use the precompiled binaries), to about 6 hours (if you
14have a version 6 or 7 system which requires recompilation.)
15.SH
16Extracting the tape
17.PP
18To extract the tape you will need a 800 BPI tape drive and a file system
19with 12000 blocks of free space. If your tape was written with \fItar\fR
20or \fIcpio\fR, then extracting the tape is straightforward.
21If it was written with \fItp\fR (the default) then some work
22will be required to fully unpack the tape. Unless you will be
23using \fItp\fR here skip the next paragraph.
24.PP
25First extract the file \fBcreate\fR from the tape by doing:
26.DS
27tp xm ./create
28.DE
29This is a shell script of \fBmkdir\fR commands. Run the script and then
30do
31.DS
32tp xm
33.DE
34This will take several minutes. When it completes, you will have a skeletal
35tape. In most directories on the tape will be a file \fBcont.a\fR
36which is an archive of the contents of that directory.
37The best thing to do is to unarchive all the files so you can look
38at things easily. The find command
39.DS
40find . \-name cont.a \-a \-print
41.DE
42will print the names of all the \fBcont.a\fR files. For each such file,
43change into its directory and do
44.DS
45ar x cont.a
46rm cont.a
47.DE
48You can omit the \fBrm\fR if you have tons of space.
49If you have a very old \fIar\fR, you may have to use the \fIar\fR in
50\fBmisc\fR.
51.bp
52.SH
53Installation Preparation
54.PP
55The first thing to determine is which version of \s-2UNIX\s0 you are running,
56and how much impact modifications you have made to the system will have
57on the software here.
58.SH
59Version 7
60.PP
61This is the new version of \s-2UNIX\s0 which has just been released by Bell
62Laboratories. Most of the software here has been running on version 7 for
63several months at Berkeley.
64.PP
65The binaries on the distribution tape will NOT run on version 7, as
66they were compiled on a \s-2PDP\s0-11 version 6 system. Thus you must
67recompile from the source for a version 7 system. This will not be
68hard since almost all of the software thinks it is running on version
697. The one exception is the Pascal system, which has not been run on
70version 7 (since we don't have version 7 on our \s-2PDP\s0-11s yet).
71.SH
72Version 6
73.PP
74If you have a standard version 6 \s-2UNIX\s0 system then you can just use
75the binaries on the tape and avoid the bother of recompiling. In fact,
76unless you have a late-model C compiler
77compilation may be troublesome or impossible.
78.PP
79On a ``standard'' system the \fIgetuid\fR system call returns
80the user id in the low byte of its result word. If this is
81the case on your system, then you should have no trouble installing the
82binaries supplied.\(dg
83.FS
84\(dg I have compiled the code here with a library which uses ``sys sleep''
85to implement \fIsleep()\fR, rather than the later, more efficient sleep
86implementation using new system calls pause and alarm. If you have the
87latter, you can recompile programs which sleep if you wish.
88.FE
89.SH
90Other Version 6
91.PP
92If you have a version 6 \s-2UNIX\s0 system which has 16 bit user id's (such as
93the systems at Berkeley) then you will have to modify the \fBupgrade/libretro\fR
94version 7 simulator library and recompile the programs here.
95.PP
96If you have a \s-2PWB\s0/\s-2UNIX\s0 system, the binaries supplied here should work
97(as far as I know). If they don't the \fImake\fR and \fIcc\fR from \s-2PWB\s0
98should be adequate to recompile to repair any problems.
99.bp
100.SH
101New files to be added.
102.PP
103The following are the major files and directories
104which will be created as you install the tape:
105.de BP
106.IP \fB\\$1\fR 28
107..
108.BP /bin/csh
109This is the new shell. It is not placed in
110the directory \fB/usr/ucb\fR because it is often linked to \fB/bin/makesh\fR,
111which is on a different file system than \fB/usr/ucb\fR on
112most systems.
113.BP /etc/htmp
114For version 6 systems, this forms a data base which simulates
115version 7 environments, storing home directories and (most
116importantly) terminal types for each terminal.
117.BP /etc/termcap
118This is a data base describing terminals, and is used by the \fIex\fR editor,
119and the \fItset\fR program.
120.BP /etc/ttytype
121This file maps terminal ports to their types, and indicates which
122ports are not hard wired. The
123.I tset
124program uses this to initialize the terminal type at login.
125.BP /usr/include/retrofit
126On version 6 systems, a directory of header files used to simulate version
1277 \s-2UNIX\s0.
128.BP /usr/lib/Mail.help*
129Help files for \fIMail\fR.
130.BP /usr/lib/Mail.rc
131A startup file for \fIMail\fR.
132.BP /usr/lib/ex2.0preserve
133Preserve command for \fIex\fR.
134.BP /usr/lib/ex2.0recover
135Recover command for \fIex\fR.
136.BP /usr/lib/ex2.0strings
137Error messages for \fIex\fR.
138.BP /usr/lib/how_p*
139Help files for Pascal.
140.BP /usr/lib/libretro.a
141Library simulating some version 7 calls on version 6.
142.BP /usr/lib/libtermlib.a
143Library providing terminal independent functions.
144.BP /usr/lib/me
145[Directory]
146The dynamically loaded parts of the \fI\-me\fR macros are placed here.
147.BP /usr/lib/pi1.2strings
148Error messages for \fIpi\fR, the Pascal translator.
149.BP /usr/lib/pi1:2strings
150Messages for two process \fIpi\fR for 34's and 40's.
151.BP /usr/lib/pi1
152Second pass of two process \fIpi\fR translator.
153.BP /usr/lib/*px_header
154Header files which \fIpi\fR prepends to \fIobj\fR files.
155.BP /usr/lib/tabset
156[Directory] Terminal initialization files for \fItset\fR.
157.BP /usr/lib/tmac.e
158The \fI\-me\fR macros themselves, on version 6 systems.
159.BP /usr/lib/tmac/tmac.e
160The \fI\-me\fR macros themselves, on version 7 systems.
161.BP /usr/msgs
162[Directory]
163The \fImsgs\fR program places messages here.
164.BP /usr/preserve
165[Directory]
166Editor temporaries are preserved here after system crashes.
167.BP /usr/ucb
168[Directory]
169Most of the binaries on the tape are placed here.
170They can be linked elsewhere (i.e. \fB/usr/bin\fR) but
171the makefiles which create the tape software expect
172them in \fB/usr/ucb\fR so they should be left there also.
173.bp
174.SH
175Installation procedure.
176.PP
177Now follow the following procedure:
178.IP 1.
179Run the \fBsetup\fR script in this directory to create needed files
180and directories.
181.IP 2.
182If you have a version 6 system then run the \fBinstall\fR script in the
183directory \fBupgrade/include\fR to put a copy of the retrofitting header
184files in \fB/usr/include/retrofit\fR.
185.IP 3.
186If you have a standard version 6 system (with 8 bit user id's) then
187run the \fBinstall\fR script in the directory
188\fBbin\fR on the tape. Then skip to step 6.
189.IP 4.
190If you have a non-standard version 6 system which uses 16 bit user-id's
191or has other modifications which would destroy binary compatibility,
192then:
193.RS
194.IP a.
195Look at the retrofit library source directory \fBupgrade/libretro\fR and make
196needed changes. Recreate the library and install it.
197If you have \fImake\fR you can use the \fBmakefile\fR; otherwise
198use your shell with \fBmake.script\fR.
199.IP b.
200Recompile the termlib library \fBsrc/termlib\fR, using \fBmakefile.v6\fR
201and ``make install'', or the shell script \fBmake.script\fR
202if you don't have \fImake\fR.
203.IP c.
204Recompile the programs in \fBupgrade/src\fR using \fBmake.script\fR
205or \fBmakefile\fR. These are versions
206of some programs in \fBsrc\fR which are different for version 6.
207.IP d.
208Follow the rest of the instructions for making a version 7
209compilation, using \fBmakefile.v6\fR or \fBmake.script\fR whenever
210they exist rather than \fBmakefile\fR.
211(You can skip part \fIa\fR since you have done it already.)
212.RE
213.IP 5.
214If you have a version 7 system:
215.RS
216.IP a.
217Run \fImake\fR in \fBsrc/termlib\fR, since this makes an important
218library which you will need right away.
219.IP b.
220Then start in the \fBsrc\fR directory, and run \fImake\fR there and
221then in each subdirectory (see below). Look at the \fBREAD_ME\fR files in
222each directory to get an idea of what is going on. After
223creating the binaries ``make install'' will install them in \fB/usr/ucb\fR.
224Some makefiles also install things in \fB/usr/lib/\fR or \fB/etc\fR; use
225``make \-n'' to see what \fImake\fR will do.
226.IP
227The following is a reasonable order to do the subdirectories in:
228(omitting Pascal for now):
229.DS
230Mail, csh, ex, me
231.DE
232.IP c.
233Install the Pascal system. Some of the parts of the Pascal
234system will require special treatment on version 7 as they
235use the older i/o library of version 6. See the file \fBmisc/v7pascal\fR
236for more details.
237.IP
238It is not necessary to
239compile \fBeyacc\fR or to run \fIeyacc\fR in the \fBpi\fR and
240\fBpxp\fR directories; rather just use the supplied \fBy.tab.c\fR files.
241(The supplied \fBmakefile\fRs don't run \fIeyacc\fR.)
242.IP d.
243Now prepare the utilities for the Pascal system in the
244directory \fBpascal\fR. Then prepare the Pascal translator \fBpi\fR,
245the interpreter \fBpx\fR and, finally, the profiler \fBpxp\fR.
246.IP
247If you have a non-separate I/D machine, or if you do not have
248hardware floating point, then prepare \fBpi0\fR and
249\fBpi1\fR rather than \fBpi\fR, and use the \fBpx34\fR and \fBpxp34\fR
250(NOID) versions of \fIpx\fR and \fIpxp\fR.\(dg
251.FS
252\(dg You can run \fIpi\fR (instead of \fIpi34\fR from \fBpi0\fR and \fBpi1\fR)
253on a non-floating point machine with separate
254I/D by adding a system call to simulate a mfpi instruction
255(see \fBmisc/fetchi.sys\fR).
256This \fIpi\fR will run slightly faster, and allow slightly larger programs
257to be written.
258.FE
259You should, on these machines:
260.DS
261mv /usr/ucb/pi34 /usr/ucb/pi
262mv /usr/ucb/px34 /usr/ucb/px
263mv /usr/ucb/pxp34 /usr/ucb/pxp
264.DE
265.RE
266.IP 6.
267Install the manual sections in \fBman\fR copying them to \fB/usr/man/manu\fR.
268If you have version 6, follow the instructions in \fBupgrade/man\fR
269on adapting to the different manual macros used.
270.IP 7.
271Add a line of the form
272.DS
273/usr/lib/ex2.0preserve \-a
274.DE
275to the file \fB/etc/rc\fR, before it cleans files out of \fB/tmp\fR. This
276will preserve the editor temporaries from \fB/tmp\fR after system crashes,
277and implements the editor crash recovery mechanism.\(dg
278.FS
279\(dg If \fB/usr\fR is a mounted filesystem, be sure it is mounted before
280you try to run \fB/usr/lib/ex2.0preserve\fR.
281.FE
282.IP 7.
283So that the \fImsgs\fR program can receive messages which are sent via
284.B mail
285change, change your mail program to execute
286``/usr/ucb/msgs \-s''
287with the message on the standard input whenever mail is sent to ``msgs''.
288A version 6
289.B mail
290program which does this is in
291``mail.c''
292in the directory \fBmisc\fR.
293.IP 8.
294Make sure that the programs \fB/usr/lib/ex2.0preserve\fR and
295\fB/usr/lib/ex2.0recover\fR can write the directory \fB/usr/preserve\fR.
296For security, these programs should be owned by ``root'', mode 4755,
297and the directory \fB/usr/preserve\fR should be mode 755.
298.IP
299The programs \fB/usr/ucb/setenv\fR and \fB/usr/ucb/tset\fR must
300be able to write \fB/etc/htmp\fR. It is wise to have \fB/etc/htmp\fR
301mode 644 and \fBsethome\fR and \fBttytype\fR mode 4755 to a user who
302owns \fB/etc/htmp\fR (this doesn't have to be ``root'', but it can).
303.IP 9.
304Initialize the \fB/etc/ttytype\fR data base with the types of the terminals
305on your system. The file contains one line per terminal. On version
3066, each line has the (one character) terminal name, and then a 2 character
307code. On version 7 each line has a two character code, a space, and
308then the (arbitrary length) terminal name. See \fBmisc/ttytype.v6\fR
309and \fBmisc/ttytype\fR for samples. The codes are defined by the file
310\fB/etc/termcap\fR.
311.IP 10.
312Initialize the Mail file \fB/usr/lib/Mail.rc\fR defining any \fIalias\fR
313groups for distribution of mail you wish. A line of the form
314.DS
315alias staff bill kurt eric
316.DE
317will cause ``Mail staff'' to send copies to \fIbill\fR, \fIkurt\fR, and
318\fIeric\fR.
319.SH
320Software not installed by the above procedure
321.PP
322The modifications to the standard i/o library \fBsrc/libNS\fR,
323the Berkeley network \fBsrc/net\fR, and the
324\fIfinger\fR program \fBsrc/finger.c\fR are not installed by
325the above procedure.
326.PP
327The standard I/O library modifications may require some care to make
328as several slightly different versions of this library are extant.
329See the \fBREAD_ME\fR file in the \fBsrc/libNS\fR directory.
330.PP
331If you wish to run the Berkeley network, read the material in the
332\fBsrc/net\fR directory. The network is not hard to set up, but
333this will require a bit of preparation.
334.PP
335The \fIfinger\fR program requires preparation of some data bases,
336and perhaps modifications to the \fIlogin\fR program as well as to
337\fIfinger\fR itself to work. See the comments at the beginning
338of the program \fBsrc/finger.c\fR and its manual page for details.
339.SH
340Problems you may encounter (Version 6 only)
341.IP 1.
342Recompiling the editor will overflow the standard compiler symbol table.
343See \fBupgrade/c\fR for instructions on a trivial change to make a C compiler
344with a bigger symbol table, which you can make available via the \fB\-t0\fR
345flag to \fBcc\fR. Some scripts on the tape also reference a \fB\-t1\fR version
346of the C compiler, which puts \fIswitch\fR statement code out as instructions
347rather than as data. This makes for programs with larger text spaces but
348smaller per-user data. See \fBupgrade/c\fR for the C compiler change which
349implements this.
350.IP 2.
351If you use the binaries on the tape, some will print times in Pacific time.
352They will work in your time zone if you recompile them.
353.IP 3.
354\fICsh\fR uses an \fIaccess\fR system call which is not part of a
355bare version 6 system. Its manual page and C interface are in the
356directory \fBmisc\fR, as well as a file \fBaccess.sys\fR containing information on how
357to add it to your system. The \fIaccess\fR call is in later version 6
358and version 7 systems.
359.IP 4.
360If you don't get mail in the file ``.mail'' in your login
361directory you'll have to finagle the \fIMail\fR
362program to know where you do. Look at its \fBlocal.c\fR and \fBlocal.h\fR
363files. The \fIfrom\fR program in \fBupgrade/src\fR
364will also have to be changed.
365.IP 5.
366If you have changed the \fItimes\fR system call as per 50
367changes, returning long integers for \fIproc_user_time\fR and
368\fIproc_system_time\fR, the supplied \fIcsh\fR binary will
369dump when it calls \fItimes\fR. You'll have to change some declarations
370in the shell and recompile.
371.SH
372Maintenance
373.PP
374.BP /etc/termcap
375If you get have or get terminals which aren't described
376in this data base, you will have to add entries.
377The manual page for \fItermcap\fR explains how to write new entries.
378.BP /etc/ttytype
379This file tells the types of hardwired ports and which
380lines are dialups, and is used with \fItset\fR. It must
381be edited when the system configuration changes.
382.BP /usr/preserve
383Editor temporaries are saved here after a system crash,
384when /usr/lib/ex2.0preserve is run out of /etc/rc.
385If no one cleans this directory out, it can get very
386large. You can periodically run a find command of the form
387.DS
388find /usr/preserve \-mtime +7 \-a \-exec rm \-f {} \e;
389.DE
390to clean out old junk. It is usefully run by the daemon \fIcron\fR.
391.BP /usr/msgs
392Must be cleaned out periodically (every few months).