home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Distributions / ucb / 2bsd.tar.gz / 2bsd.tar / install.ms < prev    next >
Text File  |  1979-05-09  |  15KB  |  393 lines

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