1 .\" Copyright (c) 1980, 1986, 1988 The Regents of the University of California.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)4.t 8.1 (Berkeley) 7/29/93
35 .ds LH "Installing/Operating \*(4B
40 This section describes procedures used to set up a \*(4B UNIX system.
41 These procedures are used when a system is first installed
42 or when the system configuration changes. Procedures for normal
43 system operation are described in the next section.
44 .Sh 2 "Kernel configuration"
46 This section briefly describes the layout of the kernel code and
47 how files for devices are made.
48 For a full discussion of configuring
49 and building system images, consult the document ``Building
50 4.3BSD UNIX Systems with Config'' (SMM:2).
51 .Sh 3 "Kernel organization"
53 As distributed, the kernel source is in a
54 separate tar image. The source may be physically
55 located anywhere within any filesystem so long as
56 a symbolic link to the location is created for the file
60 are normally symbolic links relative to
62 In further discussions of the system source all path names
63 will be given relative to
66 The kernel is made up of several large generic parts:
69 sys main kernel header files
70 kern kernel functions broken down as follows
71 init system startup, syscall dispatching, entry points
72 kern scheduling, descriptor handling and generic I/O
73 sys process management, signals
74 tty terminal handling and job control
75 vfs filesystem management
76 uipc interprocess communication (sockets)
77 subr miscellaneous support routines
78 vm virtual memory management
79 ufs local filesystems broken down as follows
80 ufs common local filesystem routines
82 lfs log-based filesystem
83 mfs memory based filesystem
84 nfs Sun-compatible network filesystem
85 miscfs miscellaneous filesystems broken down as follows
86 deadfs where rejected vnodes go to die
87 fdesc access to per-process file descriptors
88 fifofs IEEE Std1003.1 FIFOs
89 kernfs filesystem access to kernel data structures
90 lofs loopback filesystem
91 nullfs another loopback filesystem
92 specfs device special files
93 umapfs provide alternate uid/gid mappings
94 dev generic device drivers (SCSI, vnode, concatenated disk)
97 The networking code is organized by protocol
100 net routing and generic interface drivers
101 netinet Internet protocols (TCP, UDP, IP, etc)
102 netiso ISO protocols (TP-4, CLNP, CLTP, etc)
103 netns Xerox network systems protocols (IDP, SPP, etc)
104 netx25 CCITT X.25 protocols (X.25 Packet Level, HDLC/LAPB)
107 A separate subdirectory is provided for each machine architecture
110 hp300 HP 9000/300 series of Motorola 68000-based machines
111 hp code common to both HP 68k and (non-existent) PA-RISC ports
112 i386 Intel 386/486-based PC machines
113 luna68k Omron 68000-based workstations
114 news3400 Sony News MIPS-based workstations
115 pmax Digital 3100/5000 MIPS-based workstations
116 sparc Sun Microsystems SPARCstation 1, 1+, and 2
117 tahoe (deprecated) CCI Power 6-series machines
118 vax (deprecated) Digital VAX machines
121 Each machine directory is subdivided by function;
122 for example the hp300 directory contains
125 include exported machine-dependent header files
126 hp300 machine-dependent support code and private header files
128 conf configuration files
129 stand machine-dependent standalone code
132 Other kernel related directories
135 compile area to compile kernels
136 conf machine-independent configuration files
137 stand machine-independent standalone code
139 .Sh 3 "Devices and device drivers"
141 Devices supported by UNIX are implemented in the kernel
142 by drivers whose source is kept in
143 .Pn /sys/<architecture>/dev .
144 These drivers are loaded
145 into the system when included in a cpu specific configuration file
146 kept in the conf directory. Devices are accessed through special
147 files in the filesystem, made by the
149 program and normally kept in the
152 For all the devices supported by the distribution system, the
155 are created by devfs.
157 Determine the set of devices that you have and create a new
159 directory by mounting devfs.
160 .Sh 3 "Building new system images"
162 The kernel configuration of each UNIX system is described by
163 a single configuration file, stored in the
164 .Pn /sys/<architecture>/conf
166 To learn about the format of this file and the procedure used
167 to build system images,
168 start by reading ``Building 4.3BSD UNIX Systems with Config'' (SMM:2),
169 look at the manual pages in section 4
170 of the UNIX manual for the devices you have,
171 and look at the sample configuration files in the
172 .Pn /sys/<architecture>/conf
175 The configured system image
177 should be copied to the root, and then booted to try it out.
178 It is best to name it
180 so as not to destroy the working system until you are sure it does work:
182 \fB#\fP \fIcp kernel /newkernel\fP
185 It is also a good idea to keep the previous system around under some other
186 name. In particular, we recommend that you save the generic distribution
187 version of the system permanently as
189 for use in emergencies.
190 To boot the new version of the system you should follow the
191 bootstrap procedures outlined in section 6.1.
192 After having booted and tested the new system, it should be installed as
194 before going into multiuser operation.
195 A systematic scheme for numbering and saving old versions
196 of the system may be useful.
197 .Sh 2 "Configuring terminals"
199 If UNIX is to support simultaneous
200 access from directly-connected terminals other than the console,
207 To add a new terminal device, be sure the device is configured into the system
208 and that the special files for the device exist in
210 Then, enable the appropriate lines of
212 by setting the ``status''
213 field to \fBon\fP (or add new lines).
216 are one-for-one with entries in the file of current users
219 and therefore it is best to make changes
220 while running in single-user mode
221 and to add all the entries for a new device at once.
225 file is broken into four tab separated
226 fields (comments are shown by a `#' character and extend to
227 the end of the line). For each terminal line the four fields
229 the device (without a leading
233 should startup to service the line
234 (or \fBnone\fP if the line is to be left alone),
235 the terminal type (found in
236 .Pn /usr/share/misc/termcap ),
237 and optional status information describing if the terminal is
238 enabled or not and if it is ``secure'' (i.e. the super user should
239 be allowed to login on the line).
240 If the console is marked as ``insecure'',
241 then the root password is required to bring the machine up single-user.
242 All fields are character strings
243 with entries requiring embedded white space enclosed in double
245 Thus a newly added terminal
249 tty00 "/usr/libexec/getty std.9600" vt100 on secure # mike's office
251 The std.9600 parameter provided to
252 .Pn /usr/libexec/getty
253 is used in searching the file
255 it specifies a terminal's characteristics (such as baud rate).
256 To make custom terminal types, consult
261 Dialup terminals should be wired so that carrier is asserted only when the
262 phone line is dialed up.
263 For non-dialup terminals, from which modem control is not available,
264 you must wire back the signals so that
265 the carrier appears to always be present. For further details,
266 find your terminal driver in section 4 of the manual.
268 For network terminals (i.e. pseudo terminals), no program should
269 be started up on the lines. Thus, the normal entry in
275 (Note, the fourth field is not needed here.)
277 When the system is running multi-user, all terminals that are listed in
279 as \fBon\fP have their line enabled.
280 If, during normal operations, you wish
281 to disable a terminal line, you can edit the file
283 to change the terminal's status to \fBoff\fP and
284 then send a hangup signal to the
288 \fB#\fP \fIkill \-1 1\fP
290 Terminals can similarly be enabled by changing the status field
291 from \fBoff\fP to \fBon\fP and sending a hangup signal to
294 Note that if a special file is inaccessible when
296 tries to create a process for it,
298 will log a message to the
299 system error logging process (see
301 and try to reopen the terminal every minute, reprinting the warning
302 message every 10 minutes. Messages of this sort are normally
303 printed on the console, though other actions may occur depending
304 on the configuration information found in
305 .Pn /etc/syslog.conf .
307 Finally note that you should change the names of any dialup
309 where ? is in [0-9a-zA-Z], as some programs use this property of the
310 names to determine if a terminal is a dialup.
312 While it is possible to use truly arbitrary strings for terminal names,
313 the accounting and noticeably the
315 command make good use of the convention that tty names
316 (by default, and also after dialups are named as suggested above)
317 are distinct in the last 2 characters.
318 Change this and you may be sorry later, as the heuristic
320 uses based on these conventions will then break down and
322 will run MUCH slower.
325 The procedure for adding a new user is described in
327 You should add accounts for the initial user community, giving
328 each a directory and a password, and putting users who will wish
329 to share software in the same groups.
331 Several guest accounts have been provided on the distribution
332 system; these accounts are for people at Berkeley,
333 Bell Laboratories, and others
334 who have done major work on UNIX in the past. You can delete these accounts,
335 or leave them on the system if you expect that these people would have
336 occasion to login as guests on your system.
337 .Sh 2 "Site tailoring"
339 All programs that require the site's name, or some similar
340 characteristic, obtain the information through system calls
341 or from files located in
343 Aside from parts of the
344 system related to the network, to tailor the system to your
345 site you must simply select a site name, then edit the file
351 use a variable to set the hostname,
353 hostname=\fImysitename\fP
354 /bin/hostname $hostname
356 to define the value returned by the
358 system call. If you are running the name server, your site
359 name should be your fully qualified domain name. Programs such as
365 use this system call so that the binary images are site
368 You will also need to edit
370 to do the network interface initialization using
372 If you are not sure how to do this, see sections 5.1, 5.2, and 5.3.
373 If you are not running a routing daemon and have
374 more than one Ethernet in your environment
375 you will need to set up a default route;
376 see section 5.4 for details.
377 Before bringing your system up multiuser,
378 you should ensure that the networking is properly configured.
379 The network is started by running
381 Once started, you should test connectivity using
383 You should first test connectivity to yourself,
384 then another host on your Ethernet,
385 and finally a host on another Ethernet.
388 program can be used to inspect and debug
389 your routes; see section 5.4.
390 .Sh 2 "Setting up the line printer system"
392 The line printer system consists of at least
393 the following files and commands:
397 /usr/bin/lpq spooling queue examination program
398 /usr/bin/lprm program to delete jobs from a queue
399 /usr/bin/lpr program to enter a job in a printer queue
400 /etc/printcap printer configuration and capability database
401 /usr/sbin/lpd line printer daemon, scans spooling queues
402 /usr/sbin/lpc line printer control program
403 /etc/hosts.lpd list of host allowed to use the printers
409 is a master database describing line
410 printers directly attached to a machine and, also, printers
411 accessible across a network. The manual page
413 describes the format of this database and also
414 shows the default values for such things as the directory
415 in which spooling is performed. The line printer system handles
416 multiple printers, multiple spooling queues, local and remote
417 printers, and also printers attached via serial lines that require
418 line initialization such as the baud rate. Raster output devices
419 such as a Varian or Versatec, and laser printers such as an Imagen,
420 are also supported by the line printer system.
422 Remote spooling via the network is handled with two spooling
423 queues, one on the local machine and one on the remote machine.
424 When a remote printer job is started with
426 the job is queued locally and a daemon process created to oversee the
427 transfer of the job to the remote machine. If the destination
428 machine is unreachable, the job will remain queued until it is
429 possible to transfer the files to the spooling queue on the
432 program shows the contents of spool
433 queues on both the local and remote machines.
435 To configure your line printers, consult the printcap manual page
436 and the accompanying document, ``4.3BSD Line Printer Spooler Manual'' (SMM:7).
439 program should be present in
441 .Sh 2 "Setting up the mail system"
443 The mail system consists of the following commands:
447 /usr/bin/mail UCB mail program, described in \fImail\fP\|(1)
448 /usr/sbin/sendmail mail routing program
449 /var/spool/mail mail spooling directory
450 /var/spool/secretmail secure mail directory
451 /usr/bin/xsend secure mail sender
452 /usr/bin/xget secure mail receiver
453 /etc/aliases mail forwarding information
454 /usr/bin/newaliases command to rebuild binary forwarding database
455 /usr/bin/biff mail notification enabler
456 /usr/libexec/comsat mail notification daemon
459 Mail is normally sent and received using the
463 which provides a front-end to edit the messages sent
464 and received, and passes the messages to
467 The routing algorithm uses knowledge of the network name syntax,
468 aliasing and forwarding information, and network topology, as
469 defined in the configuration file
470 .Pn /usr/lib/sendmail.cf ,
471 to process each piece of mail.
472 Local mail is delivered by giving it to the program
473 .Pn /usr/libexec/mail.local
474 that adds it to the mailboxes in the directory
475 .Pn /var/spool/mail/<username> ,
476 using a locking protocol to avoid problems with simultaneous updates.
477 After the mail is delivered, the local mail delivery daemon
478 .Pn /usr/libexec/comsat
479 is notified, which in turn notifies users who have issued a
480 ``\fIbiff\fP y'' command that mail has arrived.
482 Mail queued in the directory
484 is normally readable only by the recipient.
485 To send mail that is secure against perusal
486 (except by a code-breaker) you should use the secret mail facility,
487 which encrypts the mail.
489 To set up the mail facility you should read the instructions in the
490 file READ_ME in the directory
491 .Pn /usr/src/usr.sbin/sendmail
492 and then adjust the necessary configuration files.
493 You should also set up the file
495 for your installation, creating mail groups as appropriate.
496 For more informations see
497 ``Sendmail Installation and Operation Guide'' (SMM:8) and
498 ``Sendmail \- An Internetwork Mail Router'' (SMM:9).
499 .Sh 3 "Setting up a UUCP connection"
503 included in \*(4B has the following features:
505 support for many auto call units and dialers
506 in addition to the DEC DN11,
508 breakup of the spooling area into multiple subdirectories,
512 file to control the set
513 of commands that may be executed by a remote site,
515 enhanced ``expect-send'' sequence capabilities when
516 logging in to a remote site,
518 new commands to be used in polling sites and
519 obtaining snap shots of
523 additional protocols for different communication media.
525 This section gives a brief overview of
527 and points out the most important steps in its installation.
529 To connect two UNIX machines with a
531 network link using modems,
532 one site must have an automatic call unit
533 and the other must have a dialup port.
534 It is better if both sites have both.
536 You should first read the paper in the UNIX System Manager's Manual:
537 ``Uucp Implementation Description'' (SMM:14).
538 It describes in detail the file formats and conventions,
539 and will give you a little context.
541 the document ``setup.tblms'',
542 located in the directory
543 .Pn /usr/src/usr.bin/uucp/UUAIDS ,
544 may be of use in tailoring the software to your needs.
548 support is located in three major directories:
552 .Pn /var/spool/uucp .
553 User commands are kept in
555 operational commands in
559 is used as a spooling area.
566 /usr/bin/uucp file-copy command
567 /usr/bin/uux remote execution command
568 /usr/bin/uusend binary file transfer using mail
569 /usr/bin/uuencode binary file encoder (for \fIuusend\fP)
570 /usr/bin/uudecode binary file decoder (for \fIuusend\fP)
571 /usr/bin/uulog scans session log files
572 /usr/bin/uusnap gives a snap-shot of \fIuucp\fP activity
573 /usr/bin/uupoll polls remote system until an answer is received
574 /usr/bin/uuname prints a list of known uucp hosts
575 /usr/bin/uuq gives information about the queue
578 The important files and commands in
584 /usr/lib/uucp/L-devices list of dialers and hard-wired lines
585 /usr/lib/uucp/L-dialcodes dialcode abbreviations
586 /usr/lib/uucp/L.aliases hostname aliases
587 /usr/lib/uucp/L.cmds commands remote sites may execute
588 /usr/lib/uucp/L.sys systems to communicate with, how to connect, and when
589 /usr/lib/uucp/SEQF sequence numbering control file
590 /usr/lib/uucp/USERFILE remote site pathname access specifications
591 /usr/lib/uucp/uucico \fIuucp\fP protocol daemon
592 /usr/lib/uucp/uuclean cleans up garbage files in spool area
593 /usr/lib/uucp/uuxqt \fIuucp\fP remote execution server
596 while the spooling area contains the following important files and directories:
600 /var/spool/uucp/C. directory for command, ``C.'' files
601 /var/spool/uucp/D. directory for data, ``D.'', files
602 /var/spool/uucp/X. directory for command execution, ``X.'', files
603 /var/spool/uucp/D.\fImachine\fP directory for local ``D.'' files
604 /var/spool/uucp/D.\fImachine\fPX directory for local ``X.'' files
605 /var/spool/uucp/TM. directory for temporary, ``TM.'', files
606 /var/spool/uucp/LOGFILE log file of \fIuucp\fP activity
607 /var/spool/uucp/SYSLOG log file of \fIuucp\fP file transfers
614 start by selecting a site name
615 (shorter than 14 characters).
618 account must be created in the password file and a password set up.
620 create the appropriate spooling directories with mode 755
625 If you have an auto-call unit,
626 the L.sys, L-dialcodes, and L-devices files should be created.
627 The L.sys file should contain
628 the phone numbers and login sequences
629 required to establish a connection with a
631 daemon on another machine.
632 For example, our L.sys file looks something like:
634 adiron Any ACU 1200 out0123456789- ogin-EOT-ogin uucp
635 cbosg Never Slave 300
636 cbosgd Never Slave 300
637 chico Never Slave 1200 out2010123456
639 The first field is the name of a site,
640 the second shows when the machine may be called,
641 the third field specifies how the host is connected
642 (through an ACU, a hard-wired line, etc.),
643 then comes the phone number to use in connecting through an auto-call unit,
644 and finally a login sequence.
646 may contain common abbreviations that are defined in the L-dialcodes file.
647 The device specification should refer to devices
648 specified in the L-devices file.
649 Listing only ACU causes the
653 to search for any available auto-call unit in L-devices.
654 Our L-dialcodes file is of the form:
659 while our L-devices file is:
661 ACU cul0 unused 1200 ventel
663 Refer to the README file in the
665 source directory for more information about installation.
669 operates it creates (and removes) many small
670 files in the directories underneath
671 .Pn /var/spool/uucp .
672 Sometimes files are left undeleted;
673 these are most easily purged with the
676 The log files can grow without bound unless trimmed back;
678 maintains these files.
679 Many useful aids in maintaining your
681 installation are included in a subdirectory UUAIDS beneath
682 .Pn /usr/src/usr.bin/uucp .
683 Peruse this directory and read the ``setup'' instructions also located there.