Reorder "Getting Started" sections
[openafs.git] / doc / xml / QuickStartUnix / auqbg005.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <chapter id="HDRWQ17">
3   <title>Installing the First AFS Machine</title>
4
5   <para>
6   <indexterm>
7     <primary>file server machine</primary>
8
9     <seealso>first AFS machine</seealso>
10
11     <seealso>file server machine, additional</seealso>
12   </indexterm>
13
14   <indexterm>
15     <primary>instructions</primary>
16
17     <secondary>first AFS machine</secondary>
18   </indexterm>
19
20   <indexterm>
21     <primary>installing</primary>
22
23     <secondary>first AFS machine</secondary>
24   </indexterm>
25
26   This chapter describes how to install the first AFS machine in your cell, configuring it as both a file server machine and a
27   client machine. After completing all procedures in this chapter, you can remove the client functionality if you wish, as described
28   in <link linkend="HDRWQ98">Removing Client Functionality</link>.</para>
29
30   <para>To install additional file server machines after completing this chapter, see <link linkend="HDRWQ99">Installing Additional
31   Server Machines</link>.</para>
32
33   <para>To install additional client machines after completing this chapter, see <link linkend="HDRWQ133">Installing Additional
34   Client Machines</link>. <indexterm>
35       <primary>requirements</primary>
36
37       <secondary>first AFS machine</secondary>
38     </indexterm></para>
39
40   <sect1 id="Header_29">
41     <title>Requirements and Configuration Decisions</title>
42
43     <para>The instructions in this chapter assume that you meet the following requirements. 
44       <itemizedlist>
45         <listitem>
46           <para>You are logged onto the machine's console as the local superuser <emphasis role="bold">root</emphasis></para>
47         </listitem>
48
49         <listitem>
50           <para>A standard version of one of the operating systems supported by the current version of AFS is running on the
51           machine</para>
52         </listitem>
53
54         <listitem>
55           <para>You have either installed the provided OpenAFS packages for 
56           your system, have access to a binary distribution tarball, or have 
57           successfully built OpenAFS from source</para>
58         </listitem>
59
60         <listitem>
61           <para>You have a Kerberos v5 realm running for your site. If you are
62           working with an existing cell which uses 
63           <emphasis role="bold">kaserver</emphasis> or Kerberos v4 for
64           authentication, please see 
65           <link linkend="KAS001">kaserver and Legacy Kerberos v4 Authentication</link>
66           for the modifications required to this installation procedure.</para>
67         </listitem>
68
69         <listitem>
70           <para>You have NTP or a similar time service deployed to ensure
71           rough clock syncronistation between your clients and servers.</para>
72         </listitem>
73       </itemizedlist></para>
74
75     <para>You must make the following configuration decisions while installing the first AFS machine. To speed the installation
76     itself, it is best to make the decisions before beginning. See the chapter in the <emphasis>OpenAFS Administration
77     Guide</emphasis> about issues in cell administration and configuration for detailed guidelines. <indexterm>
78         <primary>cell name</primary>
79
80         <secondary>choosing</secondary>
81       </indexterm> <indexterm>
82         <primary>AFS filespace</primary>
83
84         <secondary>deciding how to configure</secondary>
85       </indexterm> <indexterm>
86         <primary>filespace</primary>
87
88         <see>AFS filespace</see>
89       </indexterm> <itemizedlist>
90         <listitem>
91           <para>Select the first AFS machine</para>
92         </listitem>
93
94         <listitem>
95           <para>Select the cell name</para>
96         </listitem>
97
98         <listitem>
99           <para>Decide which partitions or logical volumes to configure as AFS server partitions, and choose the directory names on
100           which to mount them</para>
101         </listitem>
102
103         <listitem>
104           <para>Decide how big to make the client cache</para>
105         </listitem>
106
107         <listitem>
108           <para>Decide how to configure the top levels of your cell's AFS filespace</para>
109         </listitem>
110       </itemizedlist></para>
111
112     <para>This chapter is divided into three large sections corresponding to the three parts of installing the first AFS machine.
113     Perform all of the steps in the order they appear. Each functional section begins with a summary of the procedures to perform.
114     The sections are as follows: <itemizedlist>
115         <listitem>
116           <para>Installing server functionality (begins in <link linkend="HDRWQ18">Overview: Installing Server
117           Functionality</link>)</para>
118         </listitem>
119
120         <listitem>
121           <para>Installing client functionality (begins in <link linkend="HDRWQ63">Overview: Installing Client
122           Functionality</link>)</para>
123         </listitem>
124
125         <listitem>
126           <para>Configuring your cell's filespace, establishing further security mechanisms, and enabling access to foreign cells
127           (begins in <link linkend="HDRWQ71">Overview: Completing the Installation of the First AFS Machine</link>)</para>
128         </listitem>
129       </itemizedlist></para>
130
131     <indexterm>
132       <primary>overview</primary>
133
134       <secondary>installing server functionality on first AFS machine</secondary>
135     </indexterm>
136
137     <indexterm>
138       <primary>first AFS machine</primary>
139
140       <secondary>server functionality</secondary>
141     </indexterm>
142
143     <indexterm>
144       <primary>installing</primary>
145
146       <secondary>server functionality</secondary>
147
148       <tertiary>first AFS machine</tertiary>
149     </indexterm>
150   </sect1>
151
152   <sect1 id="HDRWQ18">
153     <title>Overview: Installing Server Functionality</title>
154
155     <para>In the first phase of installing your cell's first AFS machine, you install file server and database server functionality
156     by performing the following procedures: 
157     <orderedlist>
158         <listitem>
159           <para>Choose which machine to install as the first AFS machine</para>
160         </listitem>
161
162         <listitem>
163           <para>Create AFS-related directories on the local disk</para>
164         </listitem>
165
166         <listitem>
167           <para>Incorporate AFS modifications into the machine's kernel</para>
168         </listitem>
169
170         <listitem>
171           <para>Configure partitions or logical volumes for storing AFS volumes</para>
172         </listitem>
173
174         <listitem>
175           <para>On some system types, install and configure an AFS-modified version of the <emphasis role="bold">fsck</emphasis>
176           program</para>
177         </listitem>
178
179         <listitem>
180           <para>If the machine is to remain a client machine, incorporate AFS into its authentication system</para>
181         </listitem>
182
183         <listitem>
184           <para>Start the Basic OverSeer (BOS) Server</para>
185         </listitem>
186
187         <listitem>
188           <para>Define the cell name and the machine's cell membership</para>
189         </listitem>
190
191         <listitem>
192           <para>Start the database server processes: Backup Server, Protection Server, and Volume Location
193           (VL) Server</para>
194         </listitem>
195
196         <listitem>
197           <para>Configure initial security mechanisms</para>
198         </listitem>
199
200         <listitem>
201           <para>Start the <emphasis role="bold">fs</emphasis> process, which incorporates three component processes: the File
202           Server, Volume Server, and Salvager</para>
203         </listitem>
204
205         <listitem>
206           <para>Optionally, start the server portion of the Update Server</para>
207         </listitem>
208
209       </orderedlist></para>
210   </sect1>
211
212   <sect1 id="HDRWQ19">
213     <title>Choosing the First AFS Machine</title>
214
215     <para>The first AFS machine you install must have sufficient disk space to store AFS volumes. To take best advantage of AFS's
216     capabilities, store client-side binaries as well as user files in volumes. When you later install additional file server
217     machines in your cell, you can distribute these volumes among the different machines as you see fit.</para>
218
219     <para>These instructions configure the first AFS machine as a <emphasis>database server machine</emphasis>, the <emphasis>binary
220     distribution machine</emphasis> for its system type, and the cell's <emphasis>system control machine</emphasis>. For a
221     description of these roles, see the <emphasis>OpenAFS Administration Guide</emphasis>.</para>
222
223     <para>Installation of additional machines is simplest if the first machine has the lowest IP address of any database server
224     machine you currently plan to install. If you later install database server functionality on a machine with a lower IP address,
225     you must first update the <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> file on all of your cell's client machines.
226     For more details, see <link linkend="HDRWQ114">Installing Database Server Functionality</link>.</para>
227   </sect1>
228
229   <sect1 id="Header_32">
230     <title>Creating AFS Directories</title>
231
232     <indexterm>
233       <primary>usr/afs directory</primary>
234
235       <secondary>first AFS machine</secondary>
236     </indexterm>
237
238     <indexterm>
239       <primary>first AFS machine</primary>
240
241       <secondary>/usr/afs directory</secondary>
242     </indexterm>
243
244     <indexterm>
245       <primary>creating</primary>
246
247       <secondary>/usr/afs directory</secondary>
248
249       <tertiary>first AFS machine</tertiary>
250     </indexterm>
251
252     <indexterm>
253       <primary>usr/vice/etc directory</primary>
254
255       <secondary>first AFS machine</secondary>
256     </indexterm>
257
258     <indexterm>
259       <primary>first AFS machine</primary>
260
261       <secondary>/usr/vice/etc directory</secondary>
262     </indexterm>
263
264     <indexterm>
265       <primary>creating</primary>
266
267       <secondary>/usr/vice/etc directory</secondary>
268
269       <tertiary>first AFS machine</tertiary>
270     </indexterm>
271
272     <indexterm>
273       <primary>/ as start to file and directory names</primary>
274
275       <secondary>see alphabetized entries without initial slash</secondary>
276     </indexterm>
277
278     <para>If you are installing from packages (such as Debian .deb or 
279     Fedora/SuSe .rpm files), you should now install all of the available 
280     OpenAFS packages for your system type. Typically, these will include 
281     packages for client and server functionality, and a seperate package 
282     containing a suitable kernel module for your running kernel. Consult 
283     the package lists on the OpenAFS website to determine the packages 
284     appropriate for your system.</para>
285
286     <para>If you are installing from a tarfile, or from a locally compiled 
287     source tree you should create the <emphasis role="bold">/usr/afs</emphasis>
288     and <emphasis role="bold">/usr/vice/etc</emphasis> directories on the
289     local disk, to house server and client files respectively. Subsequent 
290     instructions copy files from the distribution tarfile into them. </para>
291 <programlisting>
292    # <emphasis role="bold">mkdir /usr/afs</emphasis>
293    # <emphasis role="bold">mkdir /usr/vice</emphasis>
294    # <emphasis role="bold">mkdir /usr/vice/etc</emphasis>
295 </programlisting>
296   </sect1>
297
298   <sect1 id="HDRWQ20">
299     <title>Performing Platform-Specific Procedures</title>
300
301     <para>Several of the initial procedures for installing a file server machine differ for each system type. For convenience, the
302     following sections group them together for each system type: <itemizedlist>
303         <indexterm>
304           <primary>kernel extensions</primary>
305
306           <see>AFS kernel extensions</see>
307         </indexterm>
308
309         <indexterm>
310           <primary>loading AFS kernel extensions</primary>
311
312           <see>incorporating</see>
313         </indexterm>
314
315         <indexterm>
316           <primary>building</primary>
317
318           <secondary>AFS extensions into kernel</secondary>
319
320           <see>incorporating AFS kernel extensions</see>
321         </indexterm>
322
323         <listitem>
324           <para>Incorporate AFS modifications into the kernel.</para>
325
326           <para>The kernel on every AFS client machine and, on some systems, 
327           the AFS fileservers, must incorporate AFS extensions. On machines 
328           that use a dynamic kernel module loader, it is conventional to 
329           alter the machine's initialization script to load the AFS extensions
330           at each reboot. <indexterm>
331               <primary>AFS server partition</primary>
332
333               <secondary>mounted on /vicep directory</secondary>
334             </indexterm> <indexterm>
335               <primary>partition</primary>
336
337               <see>AFS server partition</see>
338             </indexterm> <indexterm>
339               <primary>logical volume</primary>
340
341               <see>AFS server partition</see>
342             </indexterm> <indexterm>
343               <primary>requirements</primary>
344
345               <secondary>AFS server partition name and location</secondary>
346             </indexterm> <indexterm>
347               <primary>naming conventions for AFS server partition</primary>
348             </indexterm> <indexterm>
349               <primary>vicep<emphasis>xx</emphasis> directory</primary>
350
351               <see>AFS server partition</see>
352             </indexterm> <indexterm>
353               <primary>directories</primary>
354
355               <secondary>/vicep<emphasis>xx</emphasis></secondary>
356
357               <see>AFS server partition</see>
358             </indexterm></para>
359         </listitem>
360
361         <listitem>
362           <para>Configure server partitions or logical volumes to house AFS volumes.</para>
363
364           <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes
365           (for convenience, the documentation hereafter refers to partitions only). Each server partition is mounted at a directory
366           named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where <replaceable>xx</replaceable> is one or
367           two lowercase letters. By convention, the first 26 partitions are mounted on the directories called <emphasis
368           role="bold">/vicepa</emphasis> through <emphasis role="bold">/vicepz</emphasis>, the 27th one is mounted on the <emphasis
369           role="bold">/vicepaa</emphasis> directory, and so on through <emphasis role="bold">/vicepaz</emphasis> and <emphasis
370           role="bold">/vicepba</emphasis>, continuing up to the index corresponding to the maximum number of server partitions
371           supported in the current version of AFS (which is specified in the <emphasis>OpenAFS Release Notes</emphasis>).</para>
372
373           <para>The <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server
374           machine's root directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is
375           not an acceptable directory location).
376
377           The <emphasis role="bold">fileserver</emphasis> will refuse to
378           mount
379           any <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>
380           folders that are not separate partitions. </para>
381
382           <warning>
383             <para>The separate partition requirement may be overridden by
384               creating a file named
385               <emphasis role="bold">/vicep<replaceable>xx</replaceable>/AlwaysAttach</emphasis>;
386               however, mixed-use partitions, whether cache or fileserver,
387               have the risk that a non-AFS use will fill the partition and
388               not leave enough free space for AFS.  Even though it is
389               allowed, be wary of configuring a mixed-use partition
390               without understanding the ramifications of doing so with the
391               workload on your filesystem.
392               <indexterm>
393                 <primary>AFS server partition</primary>
394                 <secondary>AlwaysAttach</secondary>
395               </indexterm>
396             </para>
397           </warning>
398
399           <para>You can also add or remove server partitions on an existing file server machine. For instructions, see the chapter
400           in the <emphasis>OpenAFS Administration Guide</emphasis> about maintaining server machines.</para>
401
402           <note>
403             <para>Not all file system types supported by an operating system are necessarily supported as AFS server partitions. For
404             possible restrictions, see the <emphasis>OpenAFS Release Notes</emphasis>.</para>
405           </note>
406         </listitem>
407
408         <listitem>
409           <para>On system types using the <emphasis role="bold">inode</emphasis> storage format, install and configure a modified <emphasis role="bold">fsck</emphasis> program which
410           recognizes the structures that the File Server uses to organize volume data on AFS server partitions. The <emphasis
411           role="bold">fsck</emphasis> program provided with the operating system does not understand the AFS data structures, and so
412           removes them to the <emphasis role="bold">lost+found</emphasis> directory.</para>
413         </listitem>
414
415         <listitem>
416           <para>If the machine is to remain an AFS client machine, modify the machine's authentication system so that users obtain
417           an AFS token as they log into the local file system. Using AFS is simpler and more convenient for your users if you make
418           the modifications on all client machines. Otherwise, users must perform a two or three step login procedure (login to the local
419           system, then obtain Kerberos credentials, and then issue the <emphasis role="bold">aklog</emphasis> command). For further discussion of AFS
420           authentication, see the chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell configuration and
421           administration issues.</para>
422         </listitem>
423       </itemizedlist></para>
424
425     <para>To continue, proceed to the appropriate section: <itemizedlist>
426         <listitem>
427           <para><link linkend="HDRWQ41">Getting Started on Linux Systems</link></para>
428         </listitem>
429
430         <listitem>
431           <para><link linkend="HDRWQ45">Getting Started on Solaris Systems</link></para>
432         </listitem>
433
434         <listitem>
435           <para><link linkend="HDRWQ21">Getting Started on AIX Systems</link></para>
436         </listitem>
437       </itemizedlist></para>
438   </sect1>
439
440   <sect1 id="HDRWQ41">
441     <title>Getting Started on Linux Systems</title>
442
443     <indexterm>
444       <primary>replacing fsck program</primary>
445
446       <secondary>not necessary on Linux</secondary>
447     </indexterm>
448
449     <indexterm>
450       <primary>fsck program</primary>
451
452       <secondary>on first AFS machine</secondary>
453
454       <tertiary>Linux</tertiary>
455     </indexterm>
456
457     <indexterm>
458       <primary>first AFS machine</primary>
459
460       <secondary>fsck program</secondary>
461
462       <tertiary>on Linux</tertiary>
463     </indexterm>
464
465     <indexterm>
466       <primary>Linux</primary>
467
468       <secondary>fsck program replacement not necessary</secondary>
469     </indexterm>
470
471     <para>Since this guide was originally written, the procedure for starting 
472     OpenAFS has diverged significantly between different Linux distributions. 
473     The instructions that follow are appropriate for both the Fedora and 
474     RedHat Enterprise Linux packages distributed by OpenAFS. Additional 
475     instructions are provided for those building from source.</para>
476
477     <para>Begin by running the AFS client startup scripts, which call the
478     <emphasis role="bold">modprobe</emphasis> program to dynamically
479     load the AFS modifications into the kernel. Then create partitions for
480     storing AFS volumes. You do not need to replace the Linux <emphasis
481     role="bold">fsck</emphasis> program. If the machine is to remain an
482     AFS client machine, incorporate AFS into the machine's Pluggable
483     Authentication Module (PAM) scheme. <indexterm>
484         <primary>incorporating AFS kernel extensions</primary>
485
486         <secondary>first AFS machine</secondary>
487
488         <tertiary>Linux</tertiary>
489       </indexterm> <indexterm>
490         <primary>AFS kernel extensions</primary>
491
492         <secondary>on first AFS machine</secondary>
493
494         <tertiary>Linux</tertiary>
495       </indexterm> <indexterm>
496         <primary>first AFS machine</primary>
497
498         <secondary>AFS kernel extensions</secondary>
499
500         <tertiary>on Linux</tertiary>
501       </indexterm> <indexterm>
502         <primary>Linux</primary>
503
504         <secondary>AFS kernel extensions</secondary>
505
506         <tertiary>on first AFS machine</tertiary>
507       </indexterm></para>
508
509     <sect2 id="HDRWQ42">
510       <title>Loading AFS into the Linux Kernel</title>
511
512       <para>The <emphasis role="bold">modprobe</emphasis> program is the dynamic kernel loader for Linux. Linux does not support
513       incorporation of AFS modifications during a kernel build.</para>
514
515       <para>For AFS to function correctly, the <emphasis role="bold">modprobe</emphasis> program must run each time the machine
516       reboots, so your distribution's AFS initialization script invokes it automatically. The script also includes
517       commands that select the appropriate AFS library file automatically. In this section you run the script.</para>
518
519       <para>In later sections you verify that the script correctly initializes all AFS components, then activate a configuration
520       variable, which results in the script being incorporated into the Linux startup and shutdown sequence.</para> 
521       
522       <para>The procedure for starting up OpenAFS depends upon your distribution</para>
523       <sect3>
524         <title>Fedora and RedHat Enterprise Linux</title>
525         <para>OpenAFS provides RPMS for all current Fedora and RedHat Enterprise Linux (RHEL) releases on the OpenAFS web site and the OpenAFS yum repository.
526         <orderedlist>
527           <listitem>
528             <para>Browse to
529             http://dl.openafs.org/dl/openafs/<replaceable>VERSION</replaceable>,
530             where VERSION is the latest stable release of
531             OpenAFS. Download the
532             openafs-repository-<replaceable>VERSION</replaceable>.noarch.rpm
533             file for Fedora systems or the
534             openafs-repository-rhel-<replaceable>VERSION</replaceable>.noarch.rpm
535             file for RedHat-based systems.
536             </para>
537           </listitem>
538           <listitem>
539             <para>Install the downloaded RPM file using the following command:
540               <programlisting>
541                 # rpm -U openafs-repository*.rpm
542               </programlisting>
543             </para>
544           </listitem>
545           <listitem>
546             <para>Install the RPM set for your operating system using the yum command as follows:
547               <programlisting>
548                 # yum -y install openafs-client openafs-server openafs-krb5 kmod-openafs
549               </programlisting>
550
551             </para>
552             <para>Alternatively, you may use dynamically-compiled kernel
553               modules if you have the kernel headers, a compiler, and the
554               dkms package from
555               <ulink url="http://fedoraproject.org/wiki/EPEL"><citetitle>EPEL</citetitle></ulink> installed. 
556
557             </para>
558             <para>To use dynamically-compiled kernel modules instead of statically compiled modules, use the following command instead of the kmod-openafs as shown above:
559               <programlisting>
560                 # yum install openafs-client openafs-server openafs-krb5 dkms-openafs
561               </programlisting>
562             </para>
563           </listitem>
564 <!-- If you do this with current RHEL and Fedora releases you end up with
565      a dynroot'd client running - this breaks setting up the root.afs volume
566      as described later in this guide
567           <listitem>
568             <para>Run the AFS initialization script to load AFS extensions into 
569             the kernel. You can ignore any error messages about the inability 
570             to start the BOS Server or the Cache Manager or AFS client.</para>
571 <programlisting>
572    # <emphasis role="bold">/etc/rc.d/init.d/openafs-client  start</emphasis>
573 </programlisting>
574           </listitem>
575 -->
576         </orderedlist>
577       </para>
578       </sect3>
579       <sect3>
580          <title>Systems packaged as tar files</title>
581          <para>If you are running a system where the OpenAFS Binary Distribution
582          is provided as a tar file, or where you have built the system from
583          source yourself, you need to install the relevant components by hand
584          </para>
585          <orderedlist>
586            
587           <listitem>
588             <para>Unpack the distribution tarball. The examples below assume
589             that you have unpacked the files into the
590             <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you
591             pick a different location, substitute this in all of the following
592             examples. Once you have unpacked the distribution,
593             change directory as indicated.
594 <programlisting>
595   # <emphasis role="bold">cd /tmp/afsdist/linux/dest/root.client/usr/vice/etc</emphasis>
596 </programlisting></para>
597           </listitem>
598           
599           <listitem>
600             <para>Copy the AFS kernel library files to the local <emphasis role="bold">/usr/vice/etc/modload</emphasis> directory.
601             The filenames for the libraries have the format <emphasis
602             role="bold">libafs-</emphasis><replaceable>version</replaceable><emphasis role="bold">.o</emphasis>, where
603             <replaceable>version</replaceable> indicates the kernel build level. The string <emphasis role="bold">.mp</emphasis> in
604             the <replaceable>version</replaceable> indicates that the file is appropriate for machines running a multiprocessor
605             kernel. <programlisting>
606    # <emphasis role="bold">cp -rp  modload  /usr/vice/etc</emphasis>
607 </programlisting></para>
608           </listitem>
609
610           <listitem>
611             <para>Copy the AFS initialization script to the local directory for initialization files (by convention, <emphasis
612             role="bold">/etc/rc.d/init.d</emphasis> on Linux machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
613             extension as you copy the script. <programlisting>
614    # <emphasis role="bold">cp -p   afs.rc  /etc/rc.d/init.d/afs</emphasis> 
615 </programlisting></para>
616           </listitem>
617
618 <!-- I don't think we need to do this for Linux, and it complicates things if
619      dynroot is enabled ...
620           <listitem>
621             <para>Run the AFS initialization script to load AFS extensions into the kernel. You can ignore any error messages about
622             the inability to start the BOS Server or the Cache Manager or AFS client.</para>
623 <programlisting>
624    # <emphasis role="bold">/etc/rc.d/init.d/afs start</emphasis>
625 </programlisting>
626           </listitem>
627 -->
628         </orderedlist>
629
630       <indexterm>
631         <primary>configuring</primary>
632    
633         <secondary>AFS server partition on first AFS machine</secondary>
634
635         <tertiary>Linux</tertiary>
636       </indexterm>
637
638       <indexterm>
639         <primary>AFS server partition</primary>
640
641         <secondary>configuring on first AFS machine</secondary>
642
643         <tertiary>Linux</tertiary>
644       </indexterm>
645
646       <indexterm>
647         <primary>first AFS machine</primary>
648
649         <secondary>AFS server partition</secondary>
650
651         <tertiary>on Linux</tertiary>
652       </indexterm>
653
654       <indexterm>
655         <primary>Linux</primary>
656
657         <secondary>AFS server partition</secondary>
658
659         <tertiary>on first AFS machine</tertiary>
660       </indexterm>
661     </sect3>
662     </sect2>
663
664     <sect2 id="HDRWQ43">
665       <title>Configuring Server Partitions on Linux Systems</title>
666
667       <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
668       server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
669       <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
670       role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
671       directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
672       directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific Procedures</link>.
673       <orderedlist>
674           <listitem>
675             <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
676             partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
677    # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
678 </programlisting></para>
679           </listitem>
680
681           <listitem>
682             <para>Add a line with the following format to the file systems registry file, <emphasis
683             role="bold">/etc/fstab</emphasis>, for each directory just created. The entry maps the directory name to the disk
684             partition to be mounted on it. <programlisting>
685    /dev/<replaceable>disk</replaceable>  /vicep<replaceable>xx</replaceable>  ext2  defaults  0  2   
686 </programlisting></para>
687
688             <para>The following is an example for the first partition being configured.</para>
689
690             <programlisting>
691    /dev/sda8 /vicepa ext2 defaults 0 2
692 </programlisting>
693           </listitem>
694
695           <listitem>
696             <para>Create a file system on each partition that is to be mounted at a <emphasis
697             role="bold">/vicep</emphasis><replaceable>xx</replaceable> directory. The following command is probably appropriate, but
698             consult the Linux documentation for more information. <programlisting>
699    # <emphasis role="bold">mkfs -v /dev/</emphasis><replaceable>disk</replaceable>
700 </programlisting></para>
701           </listitem>
702
703           <listitem>
704             <para>Mount each partition by issuing either the <emphasis role="bold">mount -a</emphasis> command to mount all
705             partitions at once or the <emphasis role="bold">mount</emphasis> command to mount each partition in turn.</para>
706           </listitem>
707
708           <listitem>
709             <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
710             linkend="HDRWQ44">Enabling AFS Login on Linux Systems</link>. Otherwise, proceed to <link linkend="HDRWQ50">Starting the
711             BOS Server</link>.</para>
712           </listitem>
713         </orderedlist></para>
714
715       <indexterm>
716         <primary>enabling AFS login</primary>
717
718         <secondary>file server machine</secondary>
719
720         <tertiary>Linux</tertiary>
721       </indexterm>
722
723       <indexterm>
724         <primary>AFS login</primary>
725
726         <secondary>on file server machine</secondary>
727
728         <tertiary>Linux</tertiary>
729       </indexterm>
730
731       <indexterm>
732         <primary>first AFS machine</primary>
733
734         <secondary>AFS login</secondary>
735
736         <tertiary>on Linux</tertiary>
737       </indexterm>
738
739       <indexterm>
740         <primary>Linux</primary>
741
742         <secondary>AFS login</secondary>
743
744         <tertiary>on file server machine</tertiary>
745       </indexterm>
746
747       <indexterm>
748         <primary>PAM</primary>
749
750         <secondary>on Linux</secondary>
751
752         <tertiary>file server machine</tertiary>
753       </indexterm>
754     </sect2>
755
756     <sect2 id="HDRWQ44">
757       <title>Enabling AFS Login on Linux Systems</title>
758
759       <note>
760         <para>If you plan to remove client functionality from this machine
761         after completing the installation, skip this section and proceed
762         to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
763       </note>
764
765       <para>At this point you incorporate AFS into the operating system's
766       Pluggable Authentication Module (PAM) scheme.  PAM integrates all
767       authentication mechanisms on the machine, including login, to provide
768       the security infrastructure for authenticated access to and from the
769       machine.</para>
770
771       <para>You should first configure your system to obtain Kerberos v5
772       tickets as part of the authentication process, and then run an AFS PAM
773       module to obtain tokens from those tickets after authentication.  Many
774       Linux distributions come with a Kerberos v5 PAM module (usually called
775       pam-krb5 or pam_krb5), or you can download and install <ulink
776       url="http://www.eyrie.org/~eagle/software/pam-krb5">Russ Allbery's
777       Kerberos v5 PAM module</ulink>, which is tested regularly with AFS.
778       See the instructions of whatever PAM module you use for how to
779       configure it.</para>
780
781       <para>Some Kerberos v5 PAM modules do come with native AFS support
782       (usually requiring the Heimdal Kerberos implementation rather than the
783       MIT Kerberos implementation).  If you are using one of those PAM
784       modules, you can configure it to obtain AFS tokens.  It's more common,
785       however, to separate the AFS token acquisition into a separate PAM
786       module.</para>
787
788       <para>The recommended AFS PAM module is <ulink
789       url="http://www.eyrie.org/~eagle/software/pam-afs-session/">Russ
790       Allbery's pam-afs-session module</ulink>.  It should work with any of
791       the Kerberos v5 PAM modules.  To add it to the PAM configuration, you
792       often only need to add configuration to the session group:</para>
793
794       <example>
795         <title>Linux PAM session example</title>
796         <literallayout>session  required  pam_afs_session.so</literallayout>
797       </example>
798
799       <para>If you also want to obtain AFS tokens for <command>scp</command>
800       and similar commands that don't open a session, you will also need to
801       add the AFS PAM module to the auth group so that the PAM
802       <function>setcred</function> call will obtain tokens.  The
803       <literal>pam_afs_session</literal> module will always return success
804       for authentication so that it can be added to the auth group only for
805       <function>setcred</function>, so make sure that it's not marked as
806       <literal>sufficient</literal>.</para>
807
808       <example>
809         <title>Linux PAM auth example</title>
810 <literallayout>auth  [success=ok default=1]  pam_krb5.so
811 auth  [default=done]          pam_afs_session.so
812 auth  required                pam_unix.so try_first_pass</literallayout>
813       </example>
814
815       <para>This example will work if you want to try Kerberos v5 first and
816       then fall back to regular Unix authentication.
817       <literal>success=ok</literal> for the Kerberos PAM module followed by
818       <literal>default=done</literal> for the AFS PAM module will cause a
819       successful Kerberos login to run the AFS PAM module and then skip the
820       Unix authentication module.  <literal>default=1</literal> on the
821       Kerberos PAM module causes failure of that module to skip the next
822       module (the AFS PAM module) and fall back to the Unix module.  If you
823       want to try Unix authentication first and rearrange the order, be sure
824       to use <literal>default=die</literal> instead.</para>
825
826       <para>The PAM configuration is stored in different places in different
827       Linux distributions.  On Red Hat, look in
828       <filename>/etc/pam.d/system-auth</filename>.  On Debian and
829       derivatives, look in <filename>/etc/pam.d/common-session</filename>
830       and <filename>/etc/pam.d/common-auth</filename>.</para>
831
832       <para>For additional configuration examples and the configuration
833       options of the AFS PAM module, see its documentation.  For more
834       details on the available options for the PAM configuration, see the
835       Linux PAM documentation.</para>
836
837       <para>Sites which still require <command>kaserver</command> or
838       external Kerberos v4 authentication should consult <link
839       linkend="KAS015">Enabling kaserver based AFS Login on Linux
840       Systems</link> for details of how to enable AFS login on Linux.</para>
841       
842       <para>Proceed to <link linkend="HDRWQ50">Starting the BOS
843       Server</link> (or if referring to these instructions while installing
844       an additional file server machine, return to <link
845       linkend="HDRWQ108">Starting Server Programs</link>).</para>
846     </sect2>
847   </sect1>
848
849   <sect1 id="HDRWQ45">
850     <title>Getting Started on Solaris Systems</title>
851
852     <para>Begin by running the AFS initialization script to call the <emphasis role="bold">modload</emphasis> program distributed by
853     Sun Microsystems, which dynamically loads AFS modifications into the kernel. Then create partitions for storing AFS volumes, and
854     install and configure the AFS-modified <emphasis role="bold">fsck</emphasis> program to run on AFS server partitions. If the
855     machine is to remain an AFS client machine, incorporate AFS into the machine's Pluggable Authentication Module (PAM) scheme.
856     <indexterm>
857         <primary>incorporating AFS kernel extensions</primary>
858
859         <secondary>first AFS machine</secondary>
860
861         <tertiary>Solaris</tertiary>
862       </indexterm> <indexterm>
863         <primary>AFS kernel extensions</primary>
864
865         <secondary>on first AFS machine</secondary>
866
867         <tertiary>Solaris</tertiary>
868       </indexterm> <indexterm>
869         <primary>first AFS machine</primary>
870
871         <secondary>AFS kernel extensions</secondary>
872
873         <tertiary>on Solaris</tertiary>
874       </indexterm> <indexterm>
875         <primary>Solaris</primary>
876
877         <secondary>AFS kernel extensions</secondary>
878
879         <tertiary>on first AFS machine</tertiary>
880       </indexterm></para>
881
882     <sect2 id="HDRWQ46">
883       <title>Loading AFS into the Solaris Kernel</title>
884
885       <para>The <emphasis role="bold">modload</emphasis> program is the dynamic kernel loader provided by Sun Microsystems for
886       Solaris systems. Solaris does not support incorporation of AFS modifications during a kernel build.</para>
887
888       <para>For AFS to function correctly, the <emphasis role="bold">modload</emphasis> program must run each time the machine
889       reboots, so the AFS initialization script (included on the AFS CD-ROM) invokes it automatically. In this section you copy the
890       appropriate AFS library file to the location where the <emphasis role="bold">modload</emphasis> program accesses it and then
891       run the script.</para>
892
893       <para>In later sections you verify that the script correctly initializes all AFS components, then create the links that
894       incorporate AFS into the Solaris startup and shutdown sequence. <orderedlist>
895           <listitem>
896             <para>Unpack the OpenAFS Solaris distribution tarball. The examples
897             below assume that you have unpacked the files into the 
898             <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you 
899             pick a diferent location, substitute this in all of the following
900             exmaples. Once you have unpacked the distribution, change directory
901             as indicated. 
902 <programlisting>
903    # <emphasis role="bold">cd  /tmp/afsdist/sun4x_56/dest/root.client/usr/vice/etc</emphasis>
904 </programlisting></para>
905           </listitem>
906
907           <listitem>
908             <para>Copy the AFS initialization script to the local directory for initialization files (by convention, <emphasis
909             role="bold">/etc/init.d</emphasis> on Solaris machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
910             extension as you copy the script. <programlisting>
911    # <emphasis role="bold">cp -p  afs.rc  /etc/init.d/afs</emphasis>
912 </programlisting></para>
913           </listitem>
914
915           <listitem>
916             <para>Copy the appropriate AFS kernel library file to the local file <emphasis
917             role="bold">/kernel/fs/afs</emphasis>.</para>
918
919             <para>If the machine is running Solaris 11 on the x86_64 platform:</para>
920
921             <programlisting>
922    # <emphasis role="bold">cp -p modload/libafs64.o /kernel/drv/amd64/afs</emphasis>
923 </programlisting>
924
925             <para>If the machine is running Solaris 10 on the x86_64 platform:</para>
926
927             <programlisting>
928    # <emphasis role="bold">cp -p modload/libafs64.o /kernel/fs/amd64/afs</emphasis>
929 </programlisting>
930
931             <para>If the machine is running Solaris 2.6 or the 32-bit version of Solaris 7, its kernel supports NFS server
932             functionality, and the <emphasis role="bold">nfsd</emphasis> process is running:</para>
933
934             <programlisting>
935    # <emphasis role="bold">cp -p modload/libafs.o /kernel/fs/afs</emphasis>   
936 </programlisting>
937
938             <para>If the machine is running Solaris 2.6 or the 32-bit version of Solaris 7, and its kernel does not support NFS
939             server functionality or the <emphasis role="bold">nfsd</emphasis> process is not running:</para>
940
941             <programlisting>
942    # <emphasis role="bold">cp -p modload/libafs.nonfs.o /kernel/fs/afs</emphasis>   
943 </programlisting>
944
945             <para>If the machine is running the 64-bit version of Solaris 7, its kernel supports NFS server functionality, and the
946             <emphasis role="bold">nfsd</emphasis> process is running:</para>
947
948             <programlisting>
949    # <emphasis role="bold">cp -p modload/libafs64.o /kernel/fs/sparcv9/afs</emphasis>   
950 </programlisting>
951
952             <para>If the machine is running the 64-bit version of Solaris 7, and its kernel does not support NFS server
953             functionality or the <emphasis role="bold">nfsd</emphasis> process is not running:</para>
954
955             <programlisting>
956    # <emphasis role="bold">cp -p modload/libafs64.nonfs.o /kernel/fs/sparcv9/afs</emphasis>
957 </programlisting>
958           </listitem>
959
960           <listitem>
961             <para>Run the AFS initialization script to load AFS modifications into the kernel. You can ignore any error messages
962             about the inability to start the BOS Server or the Cache Manager or AFS client. <programlisting>
963    # <emphasis role="bold">/etc/init.d/afs start</emphasis>   
964 </programlisting></para>
965
966             <para>When an entry called <computeroutput>afs</computeroutput> does not already exist in the local <emphasis
967             role="bold">/etc/name_to_sysnum</emphasis> file, the script automatically creates it and reboots the machine to start
968             using the new version of the file. If this happens, log in again as the superuser <emphasis role="bold">root</emphasis>
969             after the reboot and run the initialization script again. This time the required entry exists in the <emphasis
970             role="bold">/etc/name_to_sysnum</emphasis> file, and the <emphasis role="bold">modload</emphasis> program runs.</para>
971
972             <programlisting>
973    login: <emphasis role="bold">root</emphasis>
974    Password: <replaceable>root_password</replaceable>
975    # <emphasis role="bold">/etc/init.d/afs start</emphasis>
976 </programlisting>
977           </listitem>
978         </orderedlist></para>
979
980       <indexterm>
981         <primary>replacing fsck program</primary>
982
983         <secondary>first AFS machine</secondary>
984
985         <tertiary>Solaris</tertiary>
986       </indexterm>
987
988       <indexterm>
989         <primary>fsck program</primary>
990
991         <secondary>on first AFS machine</secondary>
992
993         <tertiary>Solaris</tertiary>
994       </indexterm>
995
996       <indexterm>
997         <primary>first AFS machine</primary>
998
999         <secondary>fsck program</secondary>
1000
1001         <tertiary>on Solaris</tertiary>
1002       </indexterm>
1003
1004       <indexterm>
1005         <primary>Solaris</primary>
1006
1007         <secondary>fsck program</secondary>
1008
1009         <tertiary>on first AFS machine</tertiary>
1010       </indexterm>
1011     </sect2>
1012
1013     <sect2 id="HDRWQ47">
1014       <title>Configuring the AFS-modified fsck Program on Solaris Systems</title>
1015
1016       <para>In this section, you make modifications to guarantee that the appropriate <emphasis role="bold">fsck</emphasis> program
1017       runs on AFS server partitions. The <emphasis role="bold">fsck</emphasis> program provided with the operating system must never
1018       run on AFS server partitions. Because it does not recognize the structures that the File Server uses to organize volume data,
1019       it removes all of the data. To repeat:</para>
1020
1021       <para><emphasis role="bold">Never run the standard fsck program on AFS server partitions. It discards AFS volumes.</emphasis>
1022       <orderedlist>
1023           <listitem>
1024             <para>Create the <emphasis role="bold">/usr/lib/fs/afs</emphasis> directory to house the AFS-modified <emphasis
1025             role="bold">fsck</emphasis> program and related files. <programlisting>
1026    # <emphasis role="bold">mkdir /usr/lib/fs/afs</emphasis>
1027    # <emphasis role="bold">cd /usr/lib/fs/afs</emphasis>  
1028 </programlisting></para>
1029           </listitem>
1030
1031           <listitem>
1032             <para>Copy the <emphasis role="bold">vfsck</emphasis> binary to the newly created directory, changing the name as you do
1033             so. <programlisting>
1034    # <emphasis role="bold">cp  /tmp/afsdist/sun4x_56/dest/root.server/etc/vfsck  fsck</emphasis>
1035 </programlisting></para>
1036           </listitem>
1037
1038           <listitem>
1039             <para>Working in the <emphasis role="bold">/usr/lib/fs/afs</emphasis> directory, create the following links to Solaris
1040             libraries: <programlisting>
1041    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/clri</emphasis>  
1042    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/df</emphasis>
1043    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/edquota</emphasis>
1044    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ff</emphasis>
1045    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fsdb</emphasis>  
1046    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fsirand</emphasis>
1047    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fstyp</emphasis>
1048    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/labelit</emphasis>
1049    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/lockfs</emphasis>
1050    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/mkfs</emphasis>  
1051    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/mount</emphasis>
1052    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ncheck</emphasis>
1053    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/newfs</emphasis>
1054    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quot</emphasis>
1055    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quota</emphasis>
1056    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quotaoff</emphasis>
1057    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quotaon</emphasis>
1058    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/repquota</emphasis>
1059    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/tunefs</emphasis>
1060    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ufsdump</emphasis>
1061    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ufsrestore</emphasis>
1062    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/volcopy</emphasis>
1063 </programlisting></para>
1064           </listitem>
1065
1066           <listitem>
1067             <para>Append the following line to the end of the file <emphasis role="bold">/etc/dfs/fstypes</emphasis>.
1068             <programlisting>
1069    afs AFS Utilities
1070 </programlisting></para>
1071           </listitem>
1072
1073           <listitem>
1074             <para>Edit the <emphasis role="bold">/sbin/mountall</emphasis> file, making two changes. <itemizedlist>
1075                 <listitem>
1076                   <para>Add an entry for AFS to the <computeroutput>case</computeroutput> statement for option 2, so that it reads
1077                   as follows: <programlisting>
1078    case "$2" in
1079    ufs)    foptions="-o p"
1080            ;;
1081    afs)    foptions="-o p"
1082            ;;
1083    s5)     foptions="-y -t /var/tmp/tmp$$ -D"
1084            ;;
1085    *)      foptions="-y"
1086            ;;
1087 </programlisting></para>
1088                 </listitem>
1089
1090                 <listitem>
1091                   <para>Edit the file so that all AFS and UFS partitions are checked in parallel. Replace the following section of
1092                   code: <programlisting>
1093    # For  fsck purposes, we make a distinction between ufs and
1094    # other file systems
1095    #
1096    if [ "$fstype" = "ufs" ]; then
1097         ufs_fscklist="$ufs_fscklist $fsckdev"
1098         saveentry $fstype "$OPTIONS" $special $mountp
1099         continue
1100    fi  
1101 </programlisting></para>
1102
1103                   <para>with the following section of code:</para>
1104
1105                   <programlisting>
1106    # For fsck purposes, we make a distinction between ufs/afs
1107    # and other file systems.
1108    #
1109    if [ "$fstype" = "ufs" -o "$fstype" = "afs" ]; then
1110         ufs_fscklist="$ufs_fscklist $fsckdev"
1111         saveentry $fstype "$OPTIONS" $special $mountp
1112         continue
1113    fi
1114 </programlisting>
1115                 </listitem>
1116               </itemizedlist></para>
1117           </listitem>
1118         </orderedlist></para>
1119
1120       <indexterm>
1121         <primary>configuring</primary>
1122
1123         <secondary>AFS server partition on first AFS machine</secondary>
1124
1125         <tertiary>Solaris</tertiary>
1126       </indexterm>
1127
1128       <indexterm>
1129         <primary>AFS server partition</primary>
1130
1131         <secondary>configuring on first AFS machine</secondary>
1132
1133         <tertiary>Solaris</tertiary>
1134       </indexterm>
1135
1136       <indexterm>
1137         <primary>first AFS machine</primary>
1138
1139         <secondary>AFS server partition</secondary>
1140
1141         <tertiary>on Solaris</tertiary>
1142       </indexterm>
1143
1144       <indexterm>
1145         <primary>Solaris</primary>
1146
1147         <secondary>AFS server partition</secondary>
1148
1149         <tertiary>on first AFS machine</tertiary>
1150       </indexterm>
1151     </sect2>
1152
1153     <sect2 id="HDRWQ48">
1154       <title>Configuring Server Partitions on Solaris Systems</title>
1155
1156       <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
1157       server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
1158       <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
1159       role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
1160       directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
1161       directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific Procedures</link>.
1162       <orderedlist>
1163           <listitem>
1164             <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
1165             partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
1166    # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
1167 </programlisting></para>
1168           </listitem>
1169
1170           <listitem>
1171             <para>Add a line with the following format to the file systems registry file, <emphasis
1172             role="bold">/etc/vfstab</emphasis>, for each partition to be mounted on a directory created in the previous step. Note
1173             the value <computeroutput>afs</computeroutput> in the fourth field, which tells Solaris to use the AFS-modified
1174             <emphasis role="bold">fsck</emphasis> program on this partition. <programlisting>
1175    /dev/dsk/<replaceable>disk</replaceable>   /dev/rdsk/<replaceable>disk</replaceable>   /vicep<replaceable>xx</replaceable>   afs   <replaceable>boot_order</replaceable>  yes  
1176 </programlisting></para>
1177
1178             <para>The following is an example for the first partition being configured.</para>
1179
1180             <programlisting>
1181    /dev/dsk/c0t6d0s1 /dev/rdsk/c0t6d0s1 /vicepa afs 3 yes
1182 </programlisting>
1183           </listitem>
1184
1185           <listitem>
1186             <para>Create a file system on each partition that is to be mounted at a <emphasis
1187             role="bold">/vicep</emphasis><replaceable>xx</replaceable> directory. The following command is probably appropriate, but
1188             consult the Solaris documentation for more information. <programlisting>
1189    # <emphasis role="bold">newfs -v /dev/rdsk/</emphasis><replaceable>disk</replaceable>
1190 </programlisting></para>
1191           </listitem>
1192
1193           <listitem>
1194             <para>Issue the <emphasis role="bold">mountall</emphasis> command to mount all partitions at once.</para>
1195           </listitem>
1196
1197           <listitem>
1198             <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
1199             linkend="HDRWQ49">Enabling AFS Login and Editing the File Systems Clean-up Script on Solaris Systems</link>. Otherwise,
1200             proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
1201           </listitem>
1202         </orderedlist></para>
1203     </sect2>
1204
1205     <sect2 id="HDRWQ49">
1206       <title>Enabling AFS Login on Solaris Systems</title>
1207       <indexterm>
1208         <primary>enabling AFS login</primary>
1209
1210         <secondary>file server machine</secondary>
1211
1212         <tertiary>Solaris</tertiary>
1213       </indexterm>
1214
1215       <indexterm>
1216         <primary>AFS login</primary>
1217
1218         <secondary>on file server machine</secondary>
1219
1220         <tertiary>Solaris</tertiary>
1221       </indexterm>
1222
1223       <indexterm>
1224         <primary>first AFS machine</primary>
1225
1226         <secondary>AFS login</secondary>
1227
1228         <tertiary>on Solaris</tertiary>
1229       </indexterm>
1230
1231       <indexterm>
1232         <primary>Solaris</primary>
1233
1234         <secondary>AFS login</secondary>
1235
1236         <tertiary>on file server machine</tertiary>
1237       </indexterm>
1238
1239       <indexterm>
1240         <primary>PAM</primary>
1241
1242         <secondary>on Solaris</secondary>
1243
1244         <tertiary>file server machine</tertiary>
1245       </indexterm>
1246
1247       <note>
1248         <para>If you plan to remove client functionality from this machine after completing the installation, skip this section and
1249         proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
1250       </note>
1251
1252       <para>At this point you incorporate AFS into the operating system's
1253       Pluggable Authentication Module (PAM) scheme.  PAM integrates all
1254       authentication mechanisms on the machine, including login, to provide
1255       the security infrastructure for authenticated access to and from the
1256       machine.</para>
1257
1258       <para>Explaining PAM is beyond the scope of this document.  It is
1259       assumed that you understand the syntax and meanings of settings in the
1260       PAM configuration file (for example, how the
1261       <computeroutput>other</computeroutput> entry works, the effect of
1262       marking an entry as <computeroutput>required</computeroutput>,
1263       <computeroutput>optional</computeroutput>, or
1264       <computeroutput>sufficient</computeroutput>, and so on).</para>
1265
1266       <para>You should first configure your system to obtain Kerberos v5
1267       tickets as part of the authentication process, and then run an AFS PAM
1268       module to obtain tokens from those tickets after authentication.
1269       Current versions of Solaris come with a Kerberos v5 PAM module that
1270       will work, or you can download and install <ulink
1271       url="http://www.eyrie.org/~eagle/software/pam-krb5">Russ Allbery's
1272       Kerberos v5 PAM module</ulink>, which is tested regularly with AFS.
1273       See the instructions of whatever PAM module you use for how to
1274       configure it.</para>
1275
1276       <para>Some Kerberos v5 PAM modules do come with native AFS support
1277       (usually requiring the Heimdal Kerberos implementation rather than the
1278       MIT Kerberos implementation).  If you are using one of those PAM
1279       modules, you can configure it to obtain AFS tokens.  It's more common,
1280       however, to separate the AFS token acquisition into a separate PAM
1281       module.</para>
1282
1283       <para>The recommended AFS PAM module is <ulink
1284       url="http://www.eyrie.org/~eagle/software/pam-afs-session/">Russ
1285       Allbery's pam-afs-session module</ulink>.  It should work with any of
1286       the Kerberos v5 PAM modules.  To add it to the PAM configuration, you
1287       often only need to add configuration to the session group in
1288       <filename>pam.conf</filename>:</para>
1289
1290       <example>
1291         <title>Solaris PAM session example</title>
1292         <literallayout>login session required pam_afs_session.so</literallayout>
1293       </example>
1294
1295       <para>This example enables PAM authentication only for console login.
1296       You may want to add a similar line for the ssh service and for any
1297       other login service that you use, including possibly the
1298       <literal>other</literal> service (which serves as a catch-all).  You
1299       may also want to add options to the AFS PAM session module
1300       (particularly <literal>retain_after_close</literal>, which is
1301       necessary for some versions of Solaris.</para>
1302
1303       <para>For additional configuration examples and the configuration
1304       options of the AFS PAM module, see its documentation.  For more
1305       details on the available options for the PAM configuration, see the
1306       <filename>pam.conf</filename> manual page.</para>
1307
1308       <para>Sites which still require <emphasis
1309       role="bold">kaserver</emphasis> or external Kerberos v4 authentication
1310       should consult <link linkend="KAS016">"Enabling kaserver based AFS
1311       Login on Solaris Systems"</link> for details of how to enable AFS
1312       login on Solaris.</para>
1313
1314       <para>Proceed to <link linkend="HDRWQ49a">Editing the File Systems 
1315       Clean-up Script on Solaris Systems</link></para>
1316     </sect2>
1317     <sect2 id="HDRWQ49a">
1318       <title>Editing the File Systems Clean-up Script on Solaris Systems</title>
1319       <indexterm>
1320         <primary>Solaris</primary>
1321
1322         <secondary>file systems clean-up script</secondary>
1323
1324         <tertiary>on file server machine</tertiary>
1325       </indexterm>
1326
1327       <indexterm>
1328         <primary>file systems clean-up script (Solaris)</primary>
1329
1330         <secondary>file server machine</secondary>
1331       </indexterm>
1332
1333       <indexterm>
1334         <primary>scripts</primary>
1335
1336         <secondary>file systems clean-up (Solaris)</secondary>
1337
1338         <tertiary>file server machine</tertiary>
1339       </indexterm>
1340
1341       
1342         <orderedlist>
1343           <listitem>
1344             <para>Some Solaris distributions include a script that locates and removes unneeded files from various file systems. Its
1345             conventional location is <emphasis role="bold">/usr/lib/fs/nfs/nfsfind</emphasis>. The script generally uses an argument
1346             to the <emphasis role="bold">find</emphasis> command to define which file systems to search. In this step you modify the
1347             command to exclude the <emphasis role="bold">/afs</emphasis> directory. Otherwise, the command traverses the AFS
1348             filespace of every cell that is accessible from the machine, which can take many hours. The following alterations are
1349             possibilities, but you must verify that they are appropriate for your cell.</para>
1350
1351             <para>The first possible alteration is to add the <emphasis role="bold">-local</emphasis> flag to the existing command,
1352             so that it looks like the following:</para>
1353
1354             <programlisting>
1355    find $dir -local -name .nfs\* -mtime +7 -mount -exec rm -f {} \;   
1356 </programlisting>
1357
1358             <para>Another alternative is to exclude any directories whose names begin with the lowercase letter <emphasis
1359             role="bold">a</emphasis> or a non-alphabetic character.</para>
1360
1361             <programlisting>
1362    find /[A-Zb-z]*  <replaceable>remainder of existing command</replaceable>   
1363 </programlisting>
1364
1365             <para>Do not use the following command, which still searches under the <emphasis role="bold">/afs</emphasis> directory,
1366             looking for a subdirectory of type <emphasis role="bold">4.2</emphasis>.</para>
1367
1368             <programlisting>
1369    find / -fstype 4.2     /* <replaceable>do not use</replaceable> */
1370 </programlisting>
1371           </listitem>
1372
1373           <listitem>
1374             <para>Proceed to <link linkend="HDRWQ50">Starting the BOS Server</link> (or if referring to these instructions while
1375             installing an additional file server machine, return to <link linkend="HDRWQ108">Starting Server
1376             Programs</link>).</para>
1377           </listitem>
1378         </orderedlist>
1379
1380       <indexterm>
1381         <primary>Basic OverSeer Server</primary>
1382
1383         <see>BOS Server</see>
1384       </indexterm>
1385
1386       <indexterm>
1387         <primary>BOS Server</primary>
1388
1389         <secondary>starting</secondary>
1390
1391         <tertiary>first AFS machine</tertiary>
1392       </indexterm>
1393
1394       <indexterm>
1395         <primary>starting</primary>
1396
1397         <secondary>BOS Server</secondary>
1398
1399         <tertiary>first AFS machine</tertiary>
1400       </indexterm>
1401
1402       <indexterm>
1403         <primary>first AFS machine</primary>
1404
1405         <secondary>BOS Server</secondary>
1406       </indexterm>
1407
1408       <indexterm>
1409         <primary>authorization checking (disabling)</primary>
1410
1411         <secondary>first AFS machine</secondary>
1412       </indexterm>
1413
1414       <indexterm>
1415         <primary>disabling authorization checking</primary>
1416
1417         <secondary>first AFS machine</secondary>
1418       </indexterm>
1419
1420       <indexterm>
1421         <primary>first AFS machine</primary>
1422
1423         <secondary>authorization checking (disabling)</secondary>
1424       </indexterm>
1425     </sect2>
1426   </sect1>
1427
1428   <sect1 id="HDRWQ21">
1429     <title>Getting Started on AIX Systems</title>
1430
1431     <para>Begin by running the AFS initialization script to call the AIX kernel extension facility, which dynamically loads AFS
1432     modifications into the kernel. Then use the <emphasis role="bold">SMIT</emphasis> program to configure partitions for storing
1433     AFS volumes, and replace the AIX <emphasis role="bold">fsck</emphasis> program helper with a version that correctly handles AFS
1434     volumes. If the machine is to remain an AFS client machine, incorporate AFS into the AIX secondary authentication system.
1435     <indexterm>
1436         <primary>incorporating AFS kernel extensions</primary>
1437
1438         <secondary>first AFS machine</secondary>
1439
1440         <tertiary>AIX</tertiary>
1441       </indexterm> <indexterm>
1442         <primary>AFS kernel extensions</primary>
1443
1444         <secondary>on first AFS machine</secondary>
1445
1446         <tertiary>AIX</tertiary>
1447       </indexterm> <indexterm>
1448         <primary>first AFS machine</primary>
1449
1450         <secondary>AFS kernel extensions</secondary>
1451
1452         <tertiary>on AIX</tertiary>
1453       </indexterm> <indexterm>
1454         <primary>AIX</primary>
1455
1456         <secondary>AFS kernel extensions</secondary>
1457
1458         <tertiary>on first AFS machine</tertiary>
1459       </indexterm></para>
1460
1461     <sect2 id="HDRWQ22">
1462       <title>Loading AFS into the AIX Kernel</title>
1463
1464       <para>The AIX kernel extension facility is the dynamic kernel loader
1465       provided by IBM Corporation.  AIX does not support incorporation of
1466       AFS modifications during a kernel build.</para>
1467
1468       <para>For AFS to function correctly, the kernel extension facility must run each time the machine reboots, so the AFS
1469       initialization script (included in the AFS distribution) invokes it automatically. In this section you copy the script to the
1470       conventional location and edit it to select the appropriate options depending on whether NFS is also to run.</para>
1471
1472       <para>After editing the script, you run it to incorporate AFS into the kernel. In later sections you verify that the script
1473       correctly initializes all AFS components, then configure the AIX <emphasis role="bold">inittab</emphasis> file so that the
1474       script runs automatically at reboot. <orderedlist>
1475           <listitem>
1476             <para>Unpack the distribution tarball. The examples below assume 
1477             that you have unpacked the files into the 
1478             <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you 
1479             pick a different location, substitute this in all of the following 
1480             examples. Once you have unpacked the distribution, 
1481             change directory as indicated.
1482 <programlisting>
1483    # <emphasis role="bold">cd /tmp/afsdist/rs_aix42/dest/root.client/usr/vice/etc</emphasis>
1484 </programlisting></para>
1485           </listitem>
1486
1487           <listitem>
1488             <para>Copy the AFS kernel library files to the local <emphasis role="bold">/usr/vice/etc/dkload</emphasis> directory,
1489             and the AFS initialization script to the <emphasis role="bold">/etc</emphasis> directory. <programlisting>
1490    # <emphasis role="bold">cp -rp  dkload  /usr/vice/etc</emphasis>
1491    # <emphasis role="bold">cp -p  rc.afs  /etc/rc.afs</emphasis>
1492 </programlisting></para>
1493           </listitem>
1494
1495           <listitem>
1496             <para>Edit the <emphasis role="bold">/etc/rc.afs</emphasis> script, setting the <computeroutput>NFS</computeroutput>
1497             variable as indicated.</para>
1498
1499             <para>If the machine is not to function as an NFS/AFS Translator, set the <computeroutput>NFS</computeroutput> variable
1500             as follows.</para>
1501
1502             <programlisting>
1503    NFS=$NFS_NONE
1504 </programlisting>
1505
1506             <para>If the machine is to function as an NFS/AFS Translator and is running AIX 4.2.1 or higher, set the
1507             <computeroutput>NFS</computeroutput> variable as follows. Note that NFS must already be loaded into the kernel, which
1508             happens automatically on systems running AIX 4.1.1 and later, as long as the file <emphasis
1509             role="bold">/etc/exports</emphasis> exists.</para>
1510
1511             <programlisting>
1512    NFS=$NFS_IAUTH
1513 </programlisting>
1514           </listitem>
1515
1516           <listitem>
1517             <para>Invoke the <emphasis role="bold">/etc/rc.afs</emphasis> script to load AFS modifications into the kernel. You can
1518             ignore any error messages about the inability to start the BOS Server or the Cache Manager or AFS client.
1519             <programlisting>
1520    # <emphasis role="bold">/etc/rc.afs</emphasis>
1521 </programlisting></para>
1522           </listitem>
1523         </orderedlist></para>
1524
1525       <indexterm>
1526         <primary>configuring</primary>
1527
1528         <secondary>AFS server partition on first AFS machine</secondary>
1529
1530         <tertiary>AIX</tertiary>
1531       </indexterm>
1532
1533       <indexterm>
1534         <primary>AFS server partition</primary>
1535
1536         <secondary>configuring on first AFS machine</secondary>
1537
1538         <tertiary>AIX</tertiary>
1539       </indexterm>
1540
1541       <indexterm>
1542         <primary>first AFS machine</primary>
1543
1544         <secondary>AFS server partition</secondary>
1545
1546         <tertiary>on AIX</tertiary>
1547       </indexterm>
1548
1549       <indexterm>
1550         <primary>AIX</primary>
1551
1552         <secondary>AFS server partition</secondary>
1553
1554         <tertiary>on first AFS machine</tertiary>
1555       </indexterm>
1556     </sect2>
1557
1558     <sect2 id="HDRWQ23">
1559       <title>Configuring Server Partitions on AIX Systems</title>
1560
1561       <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
1562       server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
1563       <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
1564       role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
1565       directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
1566       directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific
1567       Procedures</link>.</para>
1568
1569       <para>To configure server partitions on an AIX system, perform the following procedures: <orderedlist>
1570           <listitem>
1571             <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
1572             partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
1573    # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
1574 </programlisting></para>
1575           </listitem>
1576
1577           <listitem>
1578             <para>Use the <emphasis role="bold">SMIT</emphasis> program to create a journaling file system on each partition to be
1579             configured as an AFS server partition.</para>
1580           </listitem>
1581
1582           <listitem>
1583             <para>Mount each partition at one of the <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>
1584             directories. Choose one of the following three methods: <itemizedlist>
1585                 <listitem>
1586                   <para>Use the <emphasis role="bold">SMIT</emphasis> program</para>
1587                 </listitem>
1588
1589                 <listitem>
1590                   <para>Use the <emphasis role="bold">mount -a</emphasis> command to mount all partitions at once</para>
1591                 </listitem>
1592
1593                 <listitem>
1594                   <para>Use the <emphasis role="bold">mount</emphasis> command on each partition in turn</para>
1595                 </listitem>
1596               </itemizedlist></para>
1597
1598             <para>Also configure the partitions so that they are mounted automatically at each reboot. For more information, refer
1599             to the AIX documentation.</para>
1600           </listitem>
1601         </orderedlist></para>
1602
1603       <indexterm>
1604         <primary>replacing fsck program</primary>
1605
1606         <secondary>first AFS machine</secondary>
1607
1608         <tertiary>AIX</tertiary>
1609       </indexterm>
1610
1611       <indexterm>
1612         <primary>fsck program</primary>
1613
1614         <secondary>on first AFS machine</secondary>
1615
1616         <tertiary>AIX</tertiary>
1617       </indexterm>
1618
1619       <indexterm>
1620         <primary>first AFS machine</primary>
1621
1622         <secondary>fsck program</secondary>
1623
1624         <tertiary>on AIX</tertiary>
1625       </indexterm>
1626
1627       <indexterm>
1628         <primary>AIX</primary>
1629
1630         <secondary>fsck program</secondary>
1631
1632         <tertiary>on first AFS machine</tertiary>
1633       </indexterm>
1634     </sect2>
1635
1636     <sect2 id="HDRWQ24">
1637       <title>Replacing the fsck Program Helper on AIX Systems</title>
1638
1639       <note><para>The AFS modified fsck program is not required on AIX 5.1 
1640       systems, and the <emphasis role="bold">v3fshelper</emphasis> program
1641       refered to below is not shipped for these systems.</para></note>
1642       
1643       <para>In this section, you make modifications to guarantee that the appropriate <emphasis role="bold">fsck</emphasis> program
1644       runs on AFS server partitions. The <emphasis role="bold">fsck</emphasis> program provided with the operating system must never
1645       run on AFS server partitions. Because it does not recognize the structures that the File Server uses to organize volume data,
1646       it removes all of the data. To repeat:</para>
1647
1648       <para><emphasis role="bold">Never run the standard fsck program on AFS server partitions. It discards AFS
1649       volumes.</emphasis></para>
1650
1651       <para>On AIX systems, you do not replace the <emphasis role="bold">fsck</emphasis> binary itself, but rather the
1652       <emphasis>program helper</emphasis> file included in the AIX distribution as <emphasis
1653       role="bold">/sbin/helpers/v3fshelper</emphasis>. <orderedlist>
1654           <listitem>
1655             <para>Move the AIX <emphasis role="bold">fsck</emphasis> program helper to a safe location and install the version from
1656             the AFS distribution in its place. 
1657 <programlisting>
1658    # <emphasis role="bold">cd /sbin/helpers</emphasis>
1659    # <emphasis role="bold">mv v3fshelper v3fshelper.noafs</emphasis>
1660    # <emphasis role="bold">cp -p /tmp/afsdist/rs_aix42/dest/root.server/etc/v3fshelper v3fshelper</emphasis>
1661 </programlisting></para>
1662           </listitem>
1663
1664           <listitem>
1665             <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
1666             linkend="HDRWQ25">Enabling AFS Login on AIX Systems</link>. Otherwise, proceed to <link linkend="HDRWQ50">Starting the
1667             BOS Server</link>.</para>
1668           </listitem>
1669         </orderedlist></para>
1670
1671       <indexterm>
1672         <primary>enabling AFS login</primary>
1673
1674         <secondary>file server machine</secondary>
1675
1676         <tertiary>AIX</tertiary>
1677       </indexterm>
1678
1679       <indexterm>
1680         <primary>AFS login</primary>
1681
1682         <secondary>on file server machine</secondary>
1683
1684         <tertiary>AIX</tertiary>
1685       </indexterm>
1686
1687       <indexterm>
1688         <primary>first AFS machine</primary>
1689
1690         <secondary>AFS login</secondary>
1691
1692         <tertiary>on AIX</tertiary>
1693       </indexterm>
1694
1695       <indexterm>
1696         <primary>AIX</primary>
1697
1698         <secondary>AFS login</secondary>
1699
1700         <tertiary>on file server machine</tertiary>
1701       </indexterm>
1702
1703       <indexterm>
1704         <primary>secondary authentication system (AIX)</primary>
1705
1706         <secondary>server machine</secondary>
1707       </indexterm>
1708     </sect2>
1709
1710     <sect2 id="HDRWQ25">
1711       <title>Enabling AFS Login on AIX Systems</title>
1712
1713       <note>
1714         <para>If you plan to remove client functionality from this machine after completing the installation, skip this section and
1715         proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
1716       </note>
1717
1718       <para>In modern AFS installations, you should be using Kerberos v5
1719       for user login, and obtaining AFS tokens following this authentication
1720       step.</para>
1721       
1722       <para>There are currently no instructions available on configuring AIX to
1723       automatically obtain AFS tokens at login. Following login, users can 
1724       obtain tokens by running the <emphasis role="bold">aklog</emphasis> 
1725       command</para>
1726      
1727       <para>Sites which still require <emphasis role="bold">kaserver</emphasis>
1728       or external Kerberos v4 authentication should consult 
1729       <link linkend="KAS012">Enabling kaserver based AFS login on AIX systems</link>
1730       for details of how to enable AIX login.</para>
1731       
1732       <para>Proceed to <link linkend="HDRWQ50">Starting the BOS Server</link> 
1733       (or if referring to these instructions while installing an additional 
1734       file server machine, return to <link linkend="HDRWQ108">Starting Server
1735       Programs</link>).</para>
1736     </sect2>
1737   </sect1>
1738   <sect1 id="HDRWQ50">
1739     <title>Starting the BOS Server</title>
1740
1741     <para>You are now ready to start the AFS server processes on this machine. 
1742     If you are not working from a packaged distribution, begin by copying the 
1743     AFS server binaries from the distribution to the conventional local disk
1744     location, the <emphasis role="bold">/usr/afs/bin</emphasis> directory. The 
1745     following instructions also create files in other subdirectories of the 
1746     <emphasis role="bold">/usr/afs</emphasis> directory.</para>
1747
1748     <para>Then issue the <emphasis role="bold">bosserver</emphasis> command to initialize the Basic OverSeer (BOS) Server, which
1749     monitors and controls other AFS server processes on its server machine. Include the <emphasis role="bold">-noauth</emphasis>
1750     flag to disable authorization checking. Because you have not yet configured your cell's AFS authentication and authorization
1751     mechanisms, the BOS Server cannot perform authorization checking as it does during normal operation. In no-authorization mode,
1752     it does not verify the identity or privilege of the issuer of a <emphasis role="bold">bos</emphasis> command, and so performs
1753     any operation for anyone.</para>
1754
1755     <para>Disabling authorization checking gravely compromises cell security. You must complete all subsequent steps in one
1756     uninterrupted pass and must not leave the machine unattended until you restart the BOS Server with authorization checking
1757     enabled, in <link linkend="HDRWQ72">Verifying the AFS Initialization Script</link>.</para>
1758
1759     <para>As it initializes for the first time, the BOS Server creates the following directories and files, setting the owner to the
1760     local superuser <emphasis role="bold">root</emphasis> and the mode bits to limit the ability to write (and in some cases, read)
1761     them. For a description of the contents and function of these directories and files, see the chapter in the <emphasis>OpenAFS
1762     Administration Guide</emphasis> about administering server machines. For further discussion of the mode bit settings, see <link
1763     linkend="HDRWQ96">Protecting Sensitive AFS Directories</link>. <indexterm>
1764         <primary>Binary Distribution</primary>
1765
1766         <secondary>copying server files from</secondary>
1767
1768         <tertiary>first AFS machine</tertiary>
1769       </indexterm> <indexterm>
1770         <primary>first AFS machine</primary>
1771
1772         <secondary>subdirectories of /usr/afs</secondary>
1773       </indexterm> <indexterm>
1774         <primary>creating</primary>
1775
1776         <secondary>/usr/afs/bin directory</secondary>
1777
1778         <tertiary>first AFS machine</tertiary>
1779       </indexterm> <indexterm>
1780         <primary>creating</primary>
1781
1782         <secondary>/usr/afs/etc directory</secondary>
1783
1784         <tertiary>first AFS machine</tertiary>
1785       </indexterm> <indexterm>
1786         <primary>copying</primary>
1787
1788         <secondary>server files to local disk</secondary>
1789
1790         <tertiary>first AFS machine</tertiary>
1791       </indexterm> <indexterm>
1792         <primary>first AFS machine</primary>
1793
1794         <secondary>copying</secondary>
1795
1796         <tertiary>server files to local disk</tertiary>
1797       </indexterm> <indexterm>
1798         <primary>usr/afs/bin directory</primary>
1799
1800         <secondary>first AFS machine</secondary>
1801       </indexterm> <indexterm>
1802         <primary>usr/afs/etc directory</primary>
1803
1804         <secondary>first AFS machine</secondary>
1805       </indexterm> <indexterm>
1806         <primary>usr/afs/db directory</primary>
1807       </indexterm> <indexterm>
1808         <primary>usr/afs/local directory</primary>
1809       </indexterm> <indexterm>
1810         <primary>usr/afs/logs directory</primary>
1811       </indexterm> <itemizedlist>
1812         <listitem>
1813           <para><emphasis role="bold">/usr/afs/db</emphasis></para>
1814         </listitem>
1815
1816         <listitem>
1817           <para><emphasis role="bold">/usr/afs/etc/CellServDB</emphasis></para>
1818         </listitem>
1819
1820         <listitem>
1821           <para><emphasis role="bold">/usr/afs/etc/ThisCell</emphasis></para>
1822         </listitem>
1823
1824         <listitem>
1825           <para><emphasis role="bold">/usr/afs/local</emphasis></para>
1826         </listitem>
1827
1828         <listitem>
1829           <para><emphasis role="bold">/usr/afs/logs</emphasis></para>
1830         </listitem>
1831       </itemizedlist></para>
1832
1833     <para>The BOS Server also creates symbolic links called <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
1834     role="bold">/usr/vice/etc/CellServDB</emphasis> to the corresponding files in the <emphasis role="bold">/usr/afs/etc</emphasis>
1835     directory. The AFS command interpreters consult the <emphasis role="bold">CellServDB</emphasis> and <emphasis
1836     role="bold">ThisCell</emphasis> files in the <emphasis role="bold">/usr/vice/etc</emphasis> directory because they generally run
1837     on client machines. On machines that are AFS servers only (as this machine currently is), the files reside only in the <emphasis
1838     role="bold">/usr/afs/etc</emphasis> directory; the links enable the command interpreters to retrieve the information they need.
1839     Later instructions for installing the client functionality replace the links with actual files. <orderedlist>
1840         <listitem>
1841           <para>If you are not working from a packaged distribution, you may need to copy files from the distribution media to the local <emphasis role="bold">/usr/afs</emphasis> directory. 
1842 <programlisting>
1843    # <emphasis role="bold">cd /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/root.server/usr/afs</emphasis>
1844    # <emphasis role="bold">cp -rp  *  /usr/afs</emphasis>
1845 </programlisting> <indexterm>
1846               <primary>commands</primary>
1847
1848               <secondary>bosserver</secondary>
1849             </indexterm> <indexterm>
1850               <primary>bosserver command</primary>
1851             </indexterm></para>
1852         </listitem>
1853
1854         <listitem>
1855           <para>Issue the <emphasis role="bold">bosserver</emphasis> command. Include the <emphasis role="bold">-noauth</emphasis>
1856           flag to disable authorization checking. <programlisting>
1857    # <emphasis role="bold">/usr/afs/bin/bosserver -noauth &amp;</emphasis>
1858 </programlisting></para>
1859         </listitem>
1860
1861         <listitem>
1862           <para>Verify that the BOS Server created <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
1863           role="bold">/usr/vice/etc/CellServDB</emphasis> as symbolic links to the corresponding files in the <emphasis
1864           role="bold">/usr/afs/etc</emphasis> directory. <programlisting>
1865    # <emphasis role="bold">ls -l  /usr/vice/etc</emphasis>
1866 </programlisting></para>
1867
1868           <para>If either or both of <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
1869           role="bold">/usr/vice/etc/CellServDB</emphasis> do not exist, or are not links, issue the following commands.</para>
1870
1871           <programlisting>
1872    # <emphasis role="bold">cd /usr/vice/etc</emphasis>
1873    # <emphasis role="bold">ln -s /usr/afs/etc/ThisCell</emphasis>
1874    # <emphasis role="bold">ln -s /usr/afs/etc/CellServDB</emphasis> 
1875 </programlisting>
1876         </listitem>
1877       </orderedlist></para>
1878
1879     <indexterm>
1880       <primary>cell name</primary>
1881
1882       <secondary>defining during installation of first machine</secondary>
1883     </indexterm>
1884
1885     <indexterm>
1886       <primary>defining</primary>
1887
1888       <secondary>cell name during installation of first machine</secondary>
1889     </indexterm>
1890
1891     <indexterm>
1892       <primary>cell name</primary>
1893
1894       <secondary>setting in server ThisCell file</secondary>
1895
1896       <tertiary>first AFS machine</tertiary>
1897     </indexterm>
1898
1899     <indexterm>
1900       <primary>setting</primary>
1901
1902       <secondary>cell name in server ThisCell file</secondary>
1903
1904       <tertiary>first AFS machine</tertiary>
1905     </indexterm>
1906
1907     <indexterm>
1908       <primary>first AFS machine</primary>
1909
1910       <secondary>ThisCell file (server)</secondary>
1911     </indexterm>
1912
1913     <indexterm>
1914       <primary>usr/afs/etc/ThisCell</primary>
1915
1916       <see>ThisCell file (server)</see>
1917     </indexterm>
1918
1919     <indexterm>
1920       <primary>ThisCell file (server)</primary>
1921
1922       <secondary>first AFS machine</secondary>
1923     </indexterm>
1924
1925     <indexterm>
1926       <primary>files</primary>
1927
1928       <secondary>ThisCell (server)</secondary>
1929     </indexterm>
1930
1931     <indexterm>
1932       <primary>database server machine</primary>
1933
1934       <secondary>entry in server CellServDB file</secondary>
1935
1936       <tertiary>on first AFS machine</tertiary>
1937     </indexterm>
1938
1939     <indexterm>
1940       <primary>first AFS machine</primary>
1941
1942       <secondary>cell membership, defining</secondary>
1943
1944       <tertiary>for server processes</tertiary>
1945     </indexterm>
1946
1947     <indexterm>
1948       <primary>usr/afs/etc/CellServDB file</primary>
1949
1950       <see>CellServDB file (server)</see>
1951     </indexterm>
1952
1953     <indexterm>
1954       <primary>CellServDB file (server)</primary>
1955
1956       <secondary>creating</secondary>
1957
1958       <tertiary>on first AFS machine</tertiary>
1959     </indexterm>
1960
1961     <indexterm>
1962       <primary>creating</primary>
1963
1964       <secondary>CellServDB file (server)</secondary>
1965
1966       <tertiary>first AFS machine</tertiary>
1967     </indexterm>
1968
1969     <indexterm>
1970       <primary>files</primary>
1971
1972       <secondary>CellServDB (server)</secondary>
1973     </indexterm>
1974
1975     <indexterm>
1976       <primary>first AFS machine</primary>
1977
1978       <secondary>CellServDB file (server)</secondary>
1979     </indexterm>
1980
1981     <indexterm>
1982       <primary>first AFS machine</primary>
1983
1984       <secondary>defining</secondary>
1985
1986       <tertiary>as database server</tertiary>
1987     </indexterm>
1988
1989     <indexterm>
1990       <primary>defining</primary>
1991
1992       <secondary>first AFS machine as database server</secondary>
1993     </indexterm>
1994   </sect1>
1995
1996   <sect1 id="HDRWQ51">
1997     <title>Defining Cell Name and Membership for Server Processes</title>
1998
1999     <para>Now assign your cell's name. The chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell configuration
2000     and administration issues discusses the important considerations, explains why changing the name is difficult, and outlines the
2001     restrictions on name format. Two of the most important restrictions are that the name cannot include uppercase letters or more
2002     than 64 characters.</para>
2003
2004     <para>Use the <emphasis role="bold">bos setcellname</emphasis> command to assign the cell name. It creates two files:
2005     <itemizedlist>
2006         <listitem>
2007           <para><emphasis role="bold">/usr/afs/etc/ThisCell</emphasis>, which defines this machine's cell membership</para>
2008         </listitem>
2009
2010         <listitem>
2011           <para><emphasis role="bold">/usr/afs/etc/CellServDB</emphasis>, which lists the cell's database server machines; the
2012           machine named on the command line is placed on the list automatically</para>
2013         </listitem>
2014       </itemizedlist> <note>
2015         <para>In the following and every instruction in this guide, for the <replaceable>machine name</replaceable> argument
2016         substitute the fully-qualified hostname (such as <emphasis role="bold">fs1.example.com</emphasis>) of the machine you are
2017         installing. For the <replaceable>cell name</replaceable> argument substitute your cell's complete name (such as <emphasis
2018         role="bold">example.com</emphasis>).</para>
2019       </note></para>
2020
2021     <indexterm>
2022       <primary>commands</primary>
2023
2024       <secondary>bos setcellname</secondary>
2025     </indexterm>
2026
2027     <indexterm>
2028       <primary>bos commands</primary>
2029
2030       <secondary>setcellname</secondary>
2031     </indexterm>
2032
2033     <orderedlist>
2034       <listitem>
2035         <para>If necessary, add the directory containing the <emphasis role="bold">bos</emphasis> command to your path.
2036       <programlisting>
2037    # <emphasis role="bold">export PATH=$PATH:/usr/afs/bin</emphasis>
2038       </programlisting>
2039         </para>
2040       </listitem>
2041
2042       <listitem>
2043         <para>Issue the <emphasis role="bold">bos setcellname</emphasis> command to set the cell name. <programlisting>
2044    # <emphasis role="bold">bos setcellname</emphasis> &lt;<replaceable>machine name</replaceable>&gt; &lt;<replaceable>cell name</replaceable>&gt; <emphasis
2045               role="bold">-noauth</emphasis>
2046 </programlisting></para>
2047
2048         <para>Because you are not authenticated and authorization checking is disabled, the <emphasis role="bold">bos</emphasis>
2049         command interpreter possibly produces error messages about being unable to obtain tickets and running unauthenticated. You
2050         can safely ignore the messages. <indexterm>
2051             <primary>commands</primary>
2052
2053             <secondary>bos listhosts</secondary>
2054           </indexterm> <indexterm>
2055             <primary>bos commands</primary>
2056
2057             <secondary>listhosts</secondary>
2058           </indexterm> <indexterm>
2059             <primary>CellServDB file (server)</primary>
2060
2061             <secondary>displaying entries</secondary>
2062           </indexterm> <indexterm>
2063             <primary>displaying</primary>
2064
2065             <secondary>CellServDB file (server) entries</secondary>
2066           </indexterm></para>
2067       </listitem>
2068
2069       <listitem>
2070         <para>Issue the <emphasis role="bold">bos listhosts</emphasis> command to verify that the machine you are installing is now
2071         registered as the cell's first database server machine. <programlisting>
2072    # <emphasis role="bold">bos listhosts</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">-noauth</emphasis>
2073    Cell name is <replaceable>cell_name</replaceable>
2074        Host 1 is <replaceable>machine_name</replaceable>
2075 </programlisting></para>
2076       </listitem>
2077     </orderedlist>
2078
2079     <indexterm>
2080       <primary>database server machine</primary>
2081
2082       <secondary>installing</secondary>
2083
2084       <tertiary>first</tertiary>
2085     </indexterm>
2086
2087     <indexterm>
2088       <primary>instructions</primary>
2089
2090       <secondary>database server machine, installing first</secondary>
2091     </indexterm>
2092
2093     <indexterm>
2094       <primary>installing</primary>
2095
2096       <secondary>database server machine</secondary>
2097
2098       <tertiary>first</tertiary>
2099     </indexterm>
2100
2101     <indexterm>
2102       <primary>Backup Server</primary>
2103
2104       <secondary>starting</secondary>
2105
2106       <tertiary>first AFS machine</tertiary>
2107     </indexterm>
2108
2109     <indexterm>
2110       <primary>buserver process</primary>
2111
2112       <see>Backup Server</see>
2113     </indexterm>
2114
2115     <indexterm>
2116       <primary>starting</primary>
2117
2118       <secondary>Backup Server</secondary>
2119
2120       <tertiary>first AFS machine</tertiary>
2121     </indexterm>
2122
2123     <indexterm>
2124       <primary>first AFS machine</primary>
2125
2126       <secondary>Backup Server</secondary>
2127     </indexterm>
2128
2129     <indexterm>
2130       <primary>Protection Server</primary>
2131
2132       <secondary>starting</secondary>
2133
2134       <tertiary>first AFS machine</tertiary>
2135     </indexterm>
2136
2137     <indexterm>
2138       <primary>ptserver process</primary>
2139
2140       <see>Protection Server</see>
2141     </indexterm>
2142
2143     <indexterm>
2144       <primary>starting</primary>
2145
2146       <secondary>Protection Server</secondary>
2147
2148       <tertiary>first AFS machine</tertiary>
2149     </indexterm>
2150
2151     <indexterm>
2152       <primary>first AFS machine</primary>
2153
2154       <secondary>Protection Server</secondary>
2155     </indexterm>
2156
2157     <indexterm>
2158       <primary>VL Server (vlserver process)</primary>
2159
2160       <secondary>starting</secondary>
2161
2162       <tertiary>first AFS machine</tertiary>
2163     </indexterm>
2164
2165     <indexterm>
2166       <primary>Volume Location Server</primary>
2167
2168       <see>VL Server</see>
2169     </indexterm>
2170
2171     <indexterm>
2172       <primary>starting</primary>
2173
2174       <secondary>VL Server</secondary>
2175
2176       <tertiary>first AFS machine</tertiary>
2177     </indexterm>
2178
2179     <indexterm>
2180       <primary>first AFS machine</primary>
2181
2182       <secondary>VL Server</secondary>
2183     </indexterm>
2184
2185     <indexterm>
2186       <primary>usr/afs/local/BosConfig</primary>
2187
2188       <see>BosConfig file</see>
2189     </indexterm>
2190
2191     <indexterm>
2192       <primary>BosConfig file</primary>
2193
2194       <secondary>adding entries</secondary>
2195
2196       <tertiary>first AFS machine</tertiary>
2197     </indexterm>
2198
2199     <indexterm>
2200       <primary>adding</primary>
2201
2202       <secondary>entries to BosConfig file</secondary>
2203
2204       <tertiary>first AFS machine</tertiary>
2205     </indexterm>
2206
2207     <indexterm>
2208       <primary>files</primary>
2209
2210       <secondary>BosConfig</secondary>
2211     </indexterm>
2212
2213     <indexterm>
2214       <primary>initializing</primary>
2215
2216       <secondary>server process</secondary>
2217
2218       <see>starting</see>
2219     </indexterm>
2220
2221     <indexterm>
2222       <primary>server process</primary>
2223
2224       <secondary>see also entry for each server's name</secondary>
2225     </indexterm>
2226   </sect1>
2227
2228   <sect1 id="HDRWQ52">
2229     <title>Starting the Database Server Processes</title>
2230
2231     <para>Next use the <emphasis role="bold">bos create</emphasis> command to create entries for the three database server processes
2232     in the <emphasis role="bold">/usr/afs/local/BosConfig</emphasis> file and start them running. The three processes run on database
2233     server machines only: <itemizedlist>
2234
2235         <listitem>
2236           <para>The Backup Server (the <emphasis role="bold">buserver</emphasis> process) maintains the Backup Database</para>
2237         </listitem>
2238
2239         <listitem>
2240           <para>The Protection Server (the <emphasis role="bold">ptserver</emphasis> process) maintains the Protection
2241           Database</para>
2242         </listitem>
2243
2244         <listitem>
2245           <para>The Volume Location (VL) Server (the <emphasis role="bold">vlserver</emphasis> process) maintains the Volume
2246           Location Database (VLDB)</para>
2247         </listitem>
2248       </itemizedlist></para>
2249
2250     <indexterm>
2251       <primary>Kerberos</primary>
2252     </indexterm>
2253
2254     <note>
2255       <para>AFS ships with an additional database server named 'kaserver', which
2256       was historically used to provide authentication services to AFS cells.
2257       kaserver was based on <emphasis>Kerberos v4</emphasis>, as such, it is
2258       not recommended for new cells. This guide assumes you have already
2259       configured a Kerberos v5 realm for your site, and details the procedures 
2260       required to use AFS with this realm. If you do wish to use
2261       <emphasis role="bold">kaserver</emphasis>, please see the modifications
2262       to these instructions detailed in 
2263       <link linkend="KAS006">Starting the kaserver Database Server Process</link>
2264       </para>
2265     </note>
2266
2267     <para>The remaining instructions in this chapter include the <emphasis role="bold">-cell</emphasis> argument on all applicable
2268     commands. Provide the cell name you assigned in <link linkend="HDRWQ51">Defining Cell Name and Membership for Server
2269     Processes</link>. If a command appears on multiple lines, it is only for legibility. <indexterm>
2270         <primary>commands</primary>
2271
2272         <secondary>bos create</secondary>
2273       </indexterm> <indexterm>
2274         <primary>bos commands</primary>
2275
2276         <secondary>create</secondary>
2277       </indexterm> <orderedlist>
2278         <listitem>
2279           <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the Backup Server. <programlisting>
2280    # <emphasis role="bold">./bos create</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">buserver simple /usr/afs/bin/buserver</emphasis>  <emphasis role="bold">-noauth</emphasis>
2281 </programlisting></para>
2282         </listitem>
2283
2284         <listitem>
2285           <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the Protection Server. <programlisting>
2286    # <emphasis role="bold">./bos create</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">ptserver simple /usr/afs/bin/ptserver</emphasis> <emphasis role="bold">-noauth</emphasis>
2287 </programlisting></para>
2288         </listitem>
2289
2290         <listitem>
2291           <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the VL Server. <programlisting>
2292    # <emphasis role="bold">./bos create</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">vlserver simple /usr/afs/bin/vlserver</emphasis> <emphasis role="bold">-noauth</emphasis>
2293 </programlisting></para>
2294         </listitem>
2295       </orderedlist></para>
2296
2297     <indexterm>
2298       <primary>admin account</primary>
2299
2300       <secondary>creating</secondary>
2301     </indexterm>
2302
2303     <indexterm>
2304       <primary>afs entry in Kerberos Database</primary>
2305     </indexterm>
2306
2307     <indexterm>
2308       <primary>Kerberos Database</primary>
2309     </indexterm>
2310
2311     <indexterm>
2312       <primary>creating</primary>
2313
2314       <secondary>afs entry in Kerberos Database</secondary>
2315     </indexterm>
2316
2317     <indexterm>
2318       <primary>creating</primary>
2319
2320       <secondary>admin account in Kerberos Database</secondary>
2321     </indexterm>
2322
2323     <indexterm>
2324       <primary>security</primary>
2325
2326       <secondary>initializing cell-wide</secondary>
2327     </indexterm>
2328
2329     <indexterm>
2330       <primary>cell</primary>
2331
2332       <secondary>initializing security mechanisms</secondary>
2333     </indexterm>
2334
2335     <indexterm>
2336       <primary>initializing</primary>
2337
2338       <secondary>cell security mechanisms</secondary>
2339     </indexterm>
2340
2341     <indexterm>
2342       <primary>usr/afs/etc/KeyFile</primary>
2343
2344       <see>KeyFile file</see>
2345     </indexterm>
2346
2347     <indexterm>
2348       <primary>KeyFile file</primary>
2349
2350       <secondary>first AFS machine</secondary>
2351     </indexterm>
2352
2353     <indexterm>
2354       <primary>files</primary>
2355
2356       <secondary>KeyFile</secondary>
2357     </indexterm>
2358
2359     <indexterm>
2360       <primary>key</primary>
2361
2362       <see>server encryption key</see>
2363     </indexterm>
2364
2365     <indexterm>
2366       <primary>encryption key</primary>
2367
2368       <see>server encryption key</see>
2369     </indexterm>
2370   </sect1>
2371
2372   <sect1 id="HDRWQ53">
2373     <title>Initializing Cell Security </title>
2374
2375     <para>If you are working with an existing cell which uses
2376     <emphasis role="bold">kaserver</emphasis> or Kerberos v4 for authentication,
2377     please see 
2378     <link linkend="HDRWQ53">Initializing Cell Security with kaserver</link>
2379     for installation instructions which replace this section.</para>
2380     
2381     <para>Now initialize the cell's security mechanisms. Begin by creating the following two entires in your site's Kerberos database: <itemizedlist>
2382         <listitem>
2383           <para>A generic administrative account, called <emphasis role="bold">admin</emphasis> by convention. If you choose to
2384           assign a different name, substitute it throughout the remainder of this document.</para>
2385
2386           <para>After you complete the installation of the first machine, you can continue to have all administrators use the
2387           <emphasis role="bold">admin</emphasis> account, or you can create a separate administrative account for each of them. The
2388           latter scheme implies somewhat more overhead, but provides a more informative audit trail for administrative
2389           operations.</para>
2390         </listitem>
2391
2392         <listitem>
2393           <para>The entry for AFS server processes, called either 
2394           <emphasis role="bold">afs</emphasis> or 
2395           <emphasis role="bold">afs/<replaceable>cell</replaceable></emphasis>. 
2396           The latter form is preferred since it works regardless of whether
2397           your cell name matches your Kerberos realm name and allows multiple
2398           AFS cells to be served from a single Kerberos realm.  
2399           No user logs in under this identity, but it is used to encrypt the
2400           server tickets that granted to AFS clients for presentation to 
2401           server processes during mutual authentication. (The
2402           chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell configuration and administration describes the
2403           role of server encryption keys in mutual authentication.)</para>
2404
2405           <para>In Step <link linkend="LIWQ58">7</link>, you also place the initial AFS server encryption key into the <emphasis
2406           role="bold">/usr/afs/etc/KeyFile</emphasis> file. The AFS server processes refer to this file to learn the server
2407           encryption key when they need to decrypt server tickets.</para>
2408         </listitem>
2409       </itemizedlist></para>
2410
2411     <para>You also issue several commands that enable the new <emphasis role="bold">admin</emphasis> user to issue privileged
2412     commands in all of the AFS suites.</para>
2413
2414     <para>The following instructions do not configure all of the security mechanisms related to the AFS Backup System. See the
2415     chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about configuring the Backup System.</para>
2416
2417     <para>The examples below assume you are using MIT Kerberos. Please refer 
2418     to the documentation for your KDC's administrative interface if you are 
2419     using a different vendor</para>
2420
2421     <orderedlist>
2422         <listitem>
2423           <para>Enter <emphasis role="bold">kadmin</emphasis> interactive mode.
2424 <programlisting>
2425    # <emphasis role="bold">kadmin</emphasis>
2426 Authenticating as principal <replaceable>you</replaceable>/admin@<replaceable>YOUR REALM</replaceable> with password
2427 Password for <replaceable>you/admin@REALM</replaceable>: <replaceable>your_password</replaceable>
2428 </programlisting> <indexterm>
2429               <primary>server encryption key</primary>
2430
2431               <secondary>in Kerberos Database</secondary>
2432             </indexterm> <indexterm>
2433               <primary>creating</primary>
2434
2435               <secondary>server encryption key</secondary>
2436
2437               <tertiary>Kerberos Database</tertiary>
2438             </indexterm></para>
2439         </listitem>
2440
2441         <listitem id="LIWQ54">
2442           <para>Issue the 
2443           <emphasis role="bold">add_principal</emphasis> command to create 
2444           Kerberos Database entries called 
2445           <emphasis role="bold">admin</emphasis> and 
2446           <emphasis role="bold">afs/&lt;<replaceable>cell name</replaceable>&gt;</emphasis>.</para>
2447
2448           <para>You should make the <replaceable>admin_passwd</replaceable> as
2449           long and complex as possible, but keep in mind that administrators 
2450           need to enter it often. It must be at least six characters long.</para>
2451           <para>Note that when creating the 
2452           <emphasis role="bold">afs/&lt;<replaceable>cell name</replaceable>&gt;</emphasis> 
2453           entry, the encryption types should be restricted to des-cbc-crc:v4. 
2454           For more details regarding encryption types, see the documentation 
2455           for your Kerberos installation.
2456
2457 <programlisting>
2458    kadmin: <emphasis role="bold">add_principal -randkey -e des-cbc-crc:v4 afs/</emphasis>&lt;<replaceable>cell name</replaceable>&gt;
2459    Principal "afs/<replaceable>cell name</replaceable>@<replaceable>REALM</replaceable>" created.
2460    kadmin:  <emphasis role="bold">add_principal admin</emphasis>
2461    Enter password for principal "admin@<replaceable>REALM</replaceable>": <emphasis role="bold"><replaceable>admin_password</replaceable></emphasis>
2462    Principal "admin@<replaceable>REALM</replaceable>" created.
2463 </programlisting>
2464           </para>
2465
2466           <indexterm>
2467             <primary>commands</primary>
2468
2469             <secondary>kas examine</secondary>
2470           </indexterm>
2471
2472           <indexterm>
2473             <primary>kas commands</primary>
2474
2475             <secondary>examine</secondary>
2476           </indexterm>
2477
2478           <indexterm>
2479             <primary>displaying</primary>
2480
2481             <secondary>server encryption key</secondary>
2482
2483             <tertiary>Authentication Database</tertiary>
2484           </indexterm>
2485         </listitem>
2486
2487         <listitem id="LIWQ55">
2488           <para>Issue the <emphasis role="bold">kadmin 
2489           get_principal</emphasis> command to display the <emphasis
2490           role="bold">afs/</emphasis>&lt;<replaceable>cell name</replaceable>&gt; entry. 
2491 <programlisting>
2492   kadmin: <emphasis role="bold">get_principal afs/&lt;<replaceable>cell name</replaceable>&gt;</emphasis>
2493   Principal: afs/<replaceable>cell</replaceable>
2494   [ ... ]
2495   Key: vno 2, DES cbc mode with CRC-32, no salt
2496   [ ... ]
2497 </programlisting>
2498 </para>
2499         </listitem>
2500         <listitem>
2501           <para>Extract the newly created key for <emphasis role="bold">afs/<replaceable>cell</replaceable></emphasis> to a keytab on the local machine. We will use <emphasis role="bold">/etc/afs.keytab</emphasis> as the location for this keytab.</para>
2502
2503           <para>The keytab contains the key material that ensures the security of your AFS cell. You should ensure that it is kept in a secure location at all times.</para>
2504
2505 <programlisting>
2506   kadmin: <emphasis role="bold">ktadd -k /etc/afs.keytab -e des-cbc-crc:v4 afs/&lt;<replaceable>cell name</replaceable>&gt;</emphasis>
2507 Entry for principal afs/&lt;<replaceable>cell name</replaceable>&gt; with kvno 3, encryption type DES cbc mode with CRC-32 added to keytab WRFILE:/etc/afs.keytab
2508 </programlisting>
2509           <para>Make a note of the key version number (kvno) given in the
2510           response, as you will need it to load the key into bos in a later
2511           step</para>
2512
2513           <note><para>Note that each time you run 
2514           <emphasis role="bold">ktadd</emphasis> a new key is generated
2515           for the item being extracted. This means that you cannot run ktadd
2516           multiple times and end up with the same key material each time.
2517           </para></note>
2518
2519         </listitem>
2520         <listitem>
2521           <para>Issue the <emphasis role="bold">quit</emphasis> command to leave <emphasis role="bold">kadmin</emphasis>
2522           interactive mode. <programlisting>
2523    kadmin: <emphasis role="bold">quit</emphasis>
2524 </programlisting> <indexterm>
2525               <primary>commands</primary>
2526
2527               <secondary>bos adduser</secondary>
2528             </indexterm> <indexterm>
2529               <primary>bos commands</primary>
2530
2531               <secondary>adduser</secondary>
2532             </indexterm> <indexterm>
2533               <primary>usr/afs/etc/UserList</primary>
2534
2535               <see>UserList file</see>
2536             </indexterm> <indexterm>
2537               <primary>UserList file</primary>
2538
2539               <secondary>first AFS machine</secondary>
2540             </indexterm> <indexterm>
2541               <primary>files</primary>
2542
2543               <secondary>UserList</secondary>
2544             </indexterm> <indexterm>
2545               <primary>creating</primary>
2546
2547               <secondary>UserList file entry</secondary>
2548             </indexterm> <indexterm>
2549               <primary>admin account</primary>
2550
2551               <secondary>adding</secondary>
2552
2553               <tertiary>to UserList file</tertiary>
2554             </indexterm></para>
2555         </listitem>
2556
2557         <listitem id="LIWQ57">
2558           <para>Issue the <emphasis role="bold">bos adduser</emphasis> command to add the <emphasis
2559           role="bold">admin</emphasis> user to the <emphasis role="bold">/usr/afs/etc/UserList</emphasis> file. This enables the
2560           <emphasis role="bold">admin</emphasis> user to issue privileged <emphasis role="bold">bos</emphasis> and <emphasis
2561           role="bold">vos</emphasis> commands. <programlisting>
2562    # <emphasis role="bold">./bos adduser</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">admin -noauth</emphasis>
2563 </programlisting> 
2564             <indexterm>
2565               <primary>commands</primary>
2566               <secondary>asetkey</secondary>
2567             </indexterm>
2568             <indexterm>
2569               <primary>creating</primary>
2570               <secondary>server encryption key</secondary>
2571               <tertiary>KeyFile file</tertiary>
2572             </indexterm> 
2573             <indexterm>
2574               <primary>server encryption key</primary>
2575               <secondary>in KeyFile file</secondary>
2576             </indexterm></para>
2577         </listitem>
2578
2579         <listitem id="LIWQ58">
2580           <para>Issue the 
2581           <emphasis role="bold">asetkey</emphasis> command to set the AFS 
2582           server encryption key in the 
2583           <emphasis role="bold">/usr/afs/etc/KeyFile</emphasis> file. This key 
2584           is created from the <emphasis role="bold">/etc/afs.keytab</emphasis> 
2585           file created earlier.</para>
2586
2587           <para>asetkey requires the key version number (or kvno) of the 
2588           <emphasis role="bold">afs/</emphasis><replaceable>cell</replaceable>
2589           key. You should have made note of the kvno when creating the key
2590           earlier.  The key version number can also be found by running the 
2591           <emphasis role="bold">kvno</emphasis> command</para>
2592 <programlisting>
2593    # <emphasis role="bold">kvno -k /etc/afs.keytab afs/</emphasis>&lt;<replaceable>cell name</replaceable>&gt;
2594 </programlisting>
2595
2596           <para>Once the kvno is known, the key can then be extracted using 
2597           asetkey</para>
2598 <programlisting>
2599    # <emphasis role="bold">asetkey add</emphasis> &lt;<replaceable>kvno</replaceable>&gt;  <emphasis role="bold">/etc/afs.keytab afs/</emphasis>&lt;<replaceable>cell name</replaceable>&gt;
2600 </programlisting>
2601
2602           <indexterm>
2603             <primary>commands</primary>
2604             <secondary>bos listkeys</secondary>
2605           </indexterm>
2606
2607           <indexterm>
2608             <primary>bos commands</primary>
2609             <secondary>listkeys</secondary>
2610           </indexterm>
2611
2612           <indexterm>
2613             <primary>displaying</primary>
2614             <secondary>server encryption key</secondary>
2615             <tertiary>KeyFile file</tertiary>
2616           </indexterm>
2617         </listitem>
2618
2619         <listitem id="LIWQ59">
2620           <para>Issue the 
2621           <emphasis role="bold">bos listkeys</emphasis> command to verify that 
2622           the key version number for the new key in the 
2623           <emphasis role="bold">KeyFile</emphasis> file is the same as the key 
2624           version number in the Authentication Database's 
2625           <emphasis role="bold">afs/<replaceable>cell name</replaceable></emphasis> 
2626           entry, which you displayed in Step <link linkend="LIWQ55">3</link>. 
2627 <programlisting>
2628    # <emphasis role="bold">./bos listkeys</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">-noauth</emphasis>
2629    key 0 has cksum <replaceable>checksum</replaceable>    
2630 </programlisting></para>
2631
2632           <para>You can safely ignore any error messages indicating that <emphasis role="bold">bos</emphasis> failed to get tickets
2633           or that authentication failed.</para>
2634         </listitem>
2635       </orderedlist>
2636     </sect1>
2637     <sect1 id="HDRWQ53a">
2638       <title>Initializing the Protection Database</title>
2639       
2640       <para>Now continue to configure your cell's security systems by
2641       populating the Protection Database with the newly created
2642       <emphasis role="bold">admin</emphasis> user, and permitting it
2643       to issue priviledged commands on the AFS filesystem.</para>
2644           
2645         <orderedlist>
2646           <listitem>
2647           <indexterm>
2648             <primary>commands</primary>
2649             <secondary>pts createuser</secondary>
2650           </indexterm>
2651
2652           <indexterm>
2653             <primary>pts commands</primary>
2654             <secondary>createuser</secondary>
2655           </indexterm>
2656
2657           <indexterm>
2658             <primary>Protection Database</primary>
2659           </indexterm>
2660           <para>Issue the <emphasis role="bold">pts createuser</emphasis> command to create a Protection Database entry for the
2661           <emphasis role="bold">admin</emphasis> user.</para>
2662
2663           <para>By default, the Protection Server assigns AFS UID 1 (one) to the <emphasis role="bold">admin</emphasis> user,
2664           because it is the first user entry you are creating. If the local password file (<emphasis
2665           role="bold">/etc/passwd</emphasis> or equivalent) already has an entry for <emphasis role="bold">admin</emphasis> that
2666           assigns it a UNIX UID other than 1, it is best to use the <emphasis role="bold">-id</emphasis> argument to the <emphasis
2667           role="bold">pts createuser</emphasis> command to make the new AFS UID match the existing UNIX UID. Otherwise, it is best
2668           to accept the default.</para>
2669
2670           <programlisting>
2671    # <emphasis role="bold">pts createuser -name admin</emphasis> [<emphasis
2672               role="bold">-id</emphasis> &lt;<replaceable>AFS UID</replaceable>&gt;]  <emphasis role="bold">-noauth</emphasis>
2673    User admin has id <replaceable>AFS UID</replaceable>
2674 </programlisting>
2675
2676           <indexterm>
2677             <primary>commands</primary>
2678             <secondary>pts adduser</secondary>
2679           </indexterm>
2680
2681           <indexterm>
2682             <primary>pts commands</primary>
2683             <secondary>adduser</secondary>
2684           </indexterm>
2685
2686           <indexterm>
2687             <primary>system:administrators group</primary>
2688           </indexterm>
2689
2690           <indexterm>
2691             <primary>admin account</primary>
2692             <secondary>adding</secondary>
2693             <tertiary>to system:administrators group</tertiary>
2694           </indexterm>
2695         </listitem>
2696
2697         <listitem>
2698           <para>Issue the <emphasis role="bold">pts adduser</emphasis> command to make the <emphasis role="bold">admin</emphasis>
2699           user a member of the <emphasis role="bold">system:administrators</emphasis> group, and the <emphasis role="bold">pts
2700           membership</emphasis> command to verify the new membership. Membership in the group enables the <emphasis
2701           role="bold">admin</emphasis> user to issue privileged <emphasis role="bold">pts</emphasis> commands and some privileged
2702           <emphasis role="bold">fs</emphasis> commands. <programlisting>
2703    # <emphasis role="bold">./pts adduser admin system:administrators</emphasis> <emphasis role="bold">-noauth</emphasis>
2704    # <emphasis role="bold">./pts membership admin</emphasis> <emphasis role="bold">-noauth</emphasis>
2705    Groups admin (id: 1) is a member of:
2706      system:administrators
2707 </programlisting> <indexterm>
2708               <primary>commands</primary>
2709               <secondary>bos restart</secondary>
2710               <tertiary>on first AFS machine</tertiary>
2711             </indexterm> <indexterm>
2712               <primary>bos commands</primary>
2713               <secondary>restart</secondary>
2714               <tertiary>on first AFS machine</tertiary>
2715             </indexterm> <indexterm>
2716               <primary>restarting server process</primary>
2717               <secondary>on first AFS machine</secondary>
2718             </indexterm> <indexterm>
2719               <primary>server process</primary>
2720               <secondary>restarting</secondary>
2721               <tertiary>on first AFS machine</tertiary>
2722             </indexterm></para>
2723         </listitem>
2724
2725         <listitem>
2726           <para>Issue the <emphasis role="bold">bos restart</emphasis> command with the <emphasis role="bold">-all</emphasis> flag
2727           to restart the database server processes, so that they start using the new server encryption key. <programlisting>
2728    # <emphasis role="bold">./bos restart</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">-all</emphasis>
2729    <emphasis role="bold">-noauth</emphasis>
2730 </programlisting></para>
2731         </listitem>
2732       </orderedlist>
2733
2734     <indexterm>
2735       <primary>File Server</primary>
2736
2737       <secondary>first AFS machine</secondary>
2738     </indexterm>
2739
2740     <indexterm>
2741       <primary>fileserver process</primary>
2742
2743       <see>File Server</see>
2744     </indexterm>
2745
2746     <indexterm>
2747       <primary>starting</primary>
2748
2749       <secondary>File Server</secondary>
2750
2751       <tertiary>first AFS machine</tertiary>
2752     </indexterm>
2753
2754     <indexterm>
2755       <primary>first AFS machine</primary>
2756
2757       <secondary>File Server, fs process</secondary>
2758     </indexterm>
2759
2760     <indexterm>
2761       <primary>Volume Server</primary>
2762
2763       <secondary>first AFS machine</secondary>
2764     </indexterm>
2765
2766     <indexterm>
2767       <primary>volserver process</primary>
2768
2769       <see>Volume Server</see>
2770     </indexterm>
2771
2772     <indexterm>
2773       <primary>starting</primary>
2774
2775       <secondary>Volume Server</secondary>
2776
2777       <tertiary>first AFS machine</tertiary>
2778     </indexterm>
2779
2780     <indexterm>
2781       <primary>first AFS machine</primary>
2782
2783       <secondary>Volume Server</secondary>
2784     </indexterm>
2785
2786     <indexterm>
2787       <primary>Salvager (salvager process)</primary>
2788
2789       <secondary>first AFS machine</secondary>
2790     </indexterm>
2791
2792     <indexterm>
2793       <primary>fs process</primary>
2794
2795       <secondary>first AFS machine</secondary>
2796     </indexterm>
2797
2798     <indexterm>
2799       <primary>starting</primary>
2800
2801       <secondary>fs process</secondary>
2802
2803       <tertiary>first AFS machine</tertiary>
2804     </indexterm>
2805
2806     <indexterm>
2807       <primary>first AFS machine</primary>
2808
2809       <secondary>Salvager</secondary>
2810     </indexterm>
2811   </sect1>
2812
2813   <sect1 id="HDRWQ60">
2814     <title>Starting the File Server processes</title>
2815
2816     <para>Start either the <emphasis role="bold">fs</emphasis> process or, if you want to run the Demand-Attach File Server, the
2817     <emphasis role="bold">dafs</emphasis> process. The <emphasis role="bold">fs</emphasis> process consists of the File Server,
2818     Volume Server, and Salvager (<emphasis role="bold">fileserver</emphasis>, <emphasis role="bold">volserver</emphasis> and
2819     <emphasis role="bold">salvager</emphasis> processes). The <emphasis role="bold">dafs</emphasis> process consists of the
2820     Demand-Attach File Server, Volume Server, Salvage Server, and Salvager (<emphasis role="bold">dafileserver</emphasis>,
2821     <emphasis role="bold"> davolserver</emphasis>, <emphasis role="bold">salvageserver</emphasis>, and <emphasis
2822     role="bold">dasalvager</emphasis> processes). For information about the Demand-Attach File Server and to see whether or not
2823     you should run it, see <link linkend="DAFS">Appendix C, The Demand-Attach File Server</link>.
2824      <orderedlist>
2825         <listitem>
2826           <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the <emphasis role="bold">fs</emphasis>
2827           process or the <emphasis role="bold">dafs</emphasis> process. The commands appear here on multiple lines only for legibility.
2828
2829             <itemizedlist>
2830               <listitem>
2831                 <para>If you are not planning on running the Demand-Attach File Server, create the <emphasis role="bold">fs</emphasis>
2832                 process:
2833                   <programlisting>
2834    # <emphasis role="bold">./bos create</emphasis>  &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">fs fs /usr/afs/bin/fileserver</emphasis>   \
2835                    <emphasis role="bold">/usr/afs/bin/volserver /usr/afs/bin/salvager</emphasis>  \
2836                    <emphasis role="bold">-noauth</emphasis>   
2837 </programlisting></para>
2838              </listitem>
2839              <listitem>
2840                <para>If you are planning on running the Demand-Attach File Server, create the <emphasis
2841                role="bold">dafs</emphasis> process:
2842                   <programlisting>
2843    # <emphasis role="bold">./bos create</emphasis>  &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">dafs dafs /usr/afs/bin/dafileserver</emphasis>   \
2844                    <emphasis role="bold">/usr/afs/bin/davolserver /usr/afs/bin/salvageserver</emphasis> \
2845                    <emphasis role="bold">/usr/afs/bin/dasalvager</emphasis> <emphasis role="bold">-noauth</emphasis>   
2846 </programlisting></para>
2847              </listitem>
2848             </itemizedlist>
2849           </para>
2850
2851           <para>Sometimes a message about Volume Location Database (VLDB) initialization appears, along with one or more instances
2852           of an error message similar to the following:</para>
2853
2854           <programlisting>
2855    FSYNC_clientInit temporary failure (will retry)   
2856 </programlisting>
2857
2858           <para>This message appears when the <emphasis role="bold">volserver</emphasis> process tries to start before the <emphasis
2859           role="bold">fileserver</emphasis> process has completed its initialization. Wait a few minutes after the last such message
2860           before continuing, to guarantee that both processes have started successfully. <indexterm>
2861               <primary>commands</primary>
2862
2863               <secondary>bos status</secondary>
2864             </indexterm> <indexterm>
2865               <primary>bos commands</primary>
2866
2867               <secondary>status</secondary>
2868             </indexterm></para>
2869
2870           <para>You can verify that the <emphasis role="bold">fs</emphasis> or <emphasis role="bold">dafs</emphasis> process has started
2871           successfully by issuing the <emphasis role="bold">bos status</emphasis> command. Its output mentions two <computeroutput>proc
2872           starts</computeroutput>.</para>
2873
2874           <itemizedlist>
2875             <listitem>
2876               <para>If you are not running the Demand-Attach File Server:
2877
2878           <programlisting>
2879    # <emphasis role="bold">./bos status</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">fs -long -noauth</emphasis>
2880 </programlisting></para></listitem>
2881
2882             <listitem>
2883               <para>If you are running the Demand-Attach File Server:
2884           <programlisting>
2885    # <emphasis role="bold">./bos status</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">dafs -long -noauth</emphasis>
2886 </programlisting></para></listitem>
2887           </itemizedlist>
2888
2889         </listitem>
2890
2891         <listitem>
2892           <para>Your next action depends on whether you have ever run AFS file server machines in the cell: <itemizedlist>
2893               <indexterm>
2894                 <primary>commands</primary>
2895
2896                 <secondary>vos create</secondary>
2897
2898                 <tertiary>root.afs volume</tertiary>
2899               </indexterm>
2900
2901               <indexterm>
2902                 <primary>vos commands</primary>
2903
2904                 <secondary>create</secondary>
2905
2906                 <tertiary>root.afs volume</tertiary>
2907               </indexterm>
2908
2909               <indexterm>
2910                 <primary>root.afs volume</primary>
2911
2912                 <secondary>creating</secondary>
2913               </indexterm>
2914
2915               <indexterm>
2916                 <primary>volume</primary>
2917
2918                 <secondary>creating</secondary>
2919
2920                 <tertiary>root.afs</tertiary>
2921               </indexterm>
2922
2923               <indexterm>
2924                 <primary>creating</primary>
2925
2926                 <secondary>root.afs volume</secondary>
2927               </indexterm>
2928
2929               <listitem>
2930                 <para>If you are installing the first AFS server machine ever in the cell (that is, you are not upgrading the AFS
2931                 software from a previous version), create the first AFS volume, <emphasis role="bold">root.afs</emphasis>.</para>
2932
2933                 <para>For the <replaceable>partition name</replaceable> argument, substitute the name of one of the machine's AFS
2934                 server partitions (such as <emphasis role="bold">/vicepa</emphasis>).</para>
2935
2936                 <programlisting>
2937    # <emphasis role="bold">./vos create</emphasis>  &lt;<replaceable>machine name</replaceable>&gt; &lt;<replaceable>partition name</replaceable>&gt; <emphasis
2938                     role="bold">root.afs</emphasis>   \
2939                    <emphasis role="bold">-noauth</emphasis>   
2940 </programlisting>
2941
2942                 <para>The Volume Server produces a message confirming that it created the volume on the specified partition. You can
2943                 ignore error messages indicating that tokens are missing, or that authentication failed. <indexterm>
2944                     <primary>commands</primary>
2945
2946                     <secondary>vos syncvldb</secondary>
2947                   </indexterm> <indexterm>
2948                     <primary>vos commands</primary>
2949
2950                     <secondary>syncvldb</secondary>
2951                   </indexterm> <indexterm>
2952                     <primary>commands</primary>
2953
2954                     <secondary>vos syncserv</secondary>
2955                   </indexterm> <indexterm>
2956                     <primary>vos commands</primary>
2957
2958                     <secondary>syncserv</secondary>
2959                   </indexterm></para>
2960               </listitem>
2961
2962               <listitem>
2963                 <para>If there are existing AFS file server machines and volumes in the cell, issue the <emphasis role="bold">vos
2964                 syncvldb</emphasis> and <emphasis role="bold">vos syncserv</emphasis> commands to synchronize the VLDB with the
2965                 actual state of volumes on the local machine. To follow the progress of the synchronization operation, which can
2966                 take several minutes, use the <emphasis role="bold">-verbose</emphasis> flag. <programlisting>
2967    # <emphasis role="bold">./vos syncvldb</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis
2968                       role="bold">-verbose  -noauth</emphasis>
2969    # <emphasis role="bold">./vos syncserv</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis
2970                       role="bold">-verbose  -noauth</emphasis>   
2971 </programlisting></para>
2972
2973                 <para>You can ignore error messages indicating that tokens are missing, or that authentication failed.</para>
2974               </listitem>
2975             </itemizedlist></para>
2976         </listitem>
2977       </orderedlist></para>
2978
2979     <indexterm>
2980       <primary>Update Server</primary>
2981
2982       <secondary>starting server portion</secondary>
2983
2984       <tertiary>first AFS machine</tertiary>
2985     </indexterm>
2986
2987     <indexterm>
2988       <primary>upserver process</primary>
2989
2990       <see>Update Server</see>
2991     </indexterm>
2992
2993     <indexterm>
2994       <primary>starting</primary>
2995
2996       <secondary>Update Server server portion</secondary>
2997
2998       <tertiary>first AFS machine</tertiary>
2999     </indexterm>
3000
3001     <indexterm>
3002       <primary>first AFS machine</primary>
3003
3004       <secondary>Update Server server portion</secondary>
3005     </indexterm>
3006
3007     <indexterm>
3008       <primary>first AFS machine</primary>
3009
3010       <secondary>defining</secondary>
3011
3012       <tertiary>as binary distribution machine</tertiary>
3013     </indexterm>
3014
3015     <indexterm>
3016       <primary>first AFS machine</primary>
3017
3018       <secondary>defining</secondary>
3019
3020       <tertiary>as system control machine</tertiary>
3021     </indexterm>
3022
3023     <indexterm>
3024       <primary>system control machine</primary>
3025     </indexterm>
3026
3027     <indexterm>
3028       <primary>binary distribution machine</primary>
3029     </indexterm>
3030   </sect1>
3031
3032   <sect1 id="HDRWQ61">
3033     <title>Starting the Server Portion of the Update Server</title>
3034
3035     <para>Start the server portion of the Update Server (the <emphasis role="bold">upserver</emphasis> process), to distribute the
3036     contents of directories on this machine to other server machines in the cell. It becomes active when you configure the client
3037     portion of the Update Server on additional server machines.</para>
3038
3039     <para>Distributing the contents of its <emphasis role="bold">/usr/afs/etc</emphasis> directory makes this machine the cell's
3040     <emphasis>system control machine</emphasis>. The other server machines in the cell run the <emphasis
3041     role="bold">upclientetc</emphasis> process (an instance of the client portion of the Update Server) to retrieve the
3042     configuration files. Use the <emphasis role="bold">-crypt</emphasis> argument to the <emphasis role="bold">upserver</emphasis>
3043     initialization command to specify that the Update Server distributes the contents of the <emphasis
3044     role="bold">/usr/afs/etc</emphasis> directory only in encrypted form, as shown in the following instruction. Several of the
3045     files in the directory, particularly the <emphasis role="bold">KeyFile</emphasis> file, are crucial to cell security and so must
3046     never cross the network unencrypted.</para>
3047
3048     <para>(You can choose not to configure a system control machine, in which case you must update the configuration files in each
3049     server machine's <emphasis role="bold">/usr/afs/etc</emphasis> directory individually. The <emphasis role="bold">bos</emphasis>
3050     commands used for this purpose also encrypt data before sending it across the network.)</para>
3051
3052     <para>Distributing the contents of its <emphasis role="bold">/usr/afs/bin</emphasis> directory to other server machines of its
3053     system type makes this machine a <emphasis>binary distribution machine</emphasis>. The other server machines of its system type
3054     run the <emphasis role="bold">upclientbin</emphasis> process (an instance of the client portion of the Update Server) to
3055     retrieve the binaries. If your platform has a package management system, 
3056     such as 'rpm' or 'apt', running the Update Server to distribute binaries 
3057     may interfere with this system.</para>
3058
3059     <para>The binaries in the <emphasis role="bold">/usr/afs/bin</emphasis> directory are not sensitive, so it is not necessary to
3060     encrypt them before transfer across the network. Include the <emphasis role="bold">-clear</emphasis> argument to the <emphasis
3061     role="bold">upserver</emphasis> initialization command to specify that the Update Server distributes the contents of the
3062     <emphasis role="bold">/usr/afs/bin</emphasis> directory in unencrypted form unless an <emphasis
3063     role="bold">upclientbin</emphasis> process requests encrypted transfer.</para>
3064
3065     <para>Note that the server and client portions of the Update Server always mutually authenticate with one another, regardless of
3066     whether you use the <emphasis role="bold">-clear</emphasis> or <emphasis role="bold">-crypt</emphasis> arguments. This protects
3067     their communications from eavesdropping to some degree.</para>
3068
3069     <para>For more information on the <emphasis role="bold">upclient</emphasis> and <emphasis role="bold">upserver</emphasis>
3070     processes, see their reference pages in the <emphasis>OpenAFS Administration Reference</emphasis>. The commands appear on
3071     multiple lines here only for legibility. <orderedlist>
3072         <listitem>
3073           <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the <emphasis role="bold">upserver</emphasis>
3074           process. <programlisting>
3075    # <emphasis role="bold">./bos create</emphasis>  &lt;<replaceable>machine name&gt;</replaceable> <emphasis role="bold">upserver simple</emphasis>  \ 
3076              <emphasis role="bold">"/usr/afs/bin/upserver  -crypt /usr/afs/etc</emphasis>    \
3077              <emphasis role="bold">-clear /usr/afs/bin"</emphasis> <emphasis role="bold">-noauth</emphasis> 
3078 </programlisting></para>
3079         </listitem>
3080       </orderedlist></para>
3081   </sect1>
3082
3083   <sect1 id="HDRWQ62">
3084     <title>Clock Sync Considerations</title>
3085
3086     <para>Keeping the clocks on all server and client machines in your cell synchronized is crucial to several functions, and in
3087     particular to the correct operation of AFS's distributed database technology, Ubik. The chapter in the <emphasis>OpenAFS
3088     Administration Guide</emphasis> about administering server machines explains how time skew can disturb Ubik's performance and
3089     cause service outages in your cell.</para>
3090
3091     <para>You should install and configure your time service independently of
3092     AFS. Your Kerberos realm will also require a reliable time source, so your site
3093     may already have one available.</para>
3094
3095     <indexterm>
3096       <primary>overview</primary>
3097
3098       <secondary>installing client functionality on first machine</secondary>
3099     </indexterm>
3100
3101     <indexterm>
3102       <primary>first AFS machine</primary>
3103
3104       <secondary>client functionality</secondary>
3105
3106       <tertiary>installing</tertiary>
3107     </indexterm>
3108
3109     <indexterm>
3110       <primary>installing</primary>
3111
3112       <secondary>client functionality</secondary>
3113
3114       <tertiary>first AFS machine</tertiary>
3115     </indexterm>
3116   </sect1>
3117
3118   <sect1 id="HDRWQ63">
3119     <title>Overview: Installing Client Functionality</title>
3120
3121     <para>The machine you are installing is now an AFS file server machine, 
3122     database server machine, system control machine, and binary distribution 
3123     machine. Now make it a client machine by completing the following tasks: 
3124     <orderedlist>
3125         <listitem>
3126           <para>Define the machine's cell membership for client processes</para>
3127         </listitem>
3128
3129         <listitem>
3130           <para>Create the client version of the <emphasis role="bold">CellServDB</emphasis> file</para>
3131         </listitem>
3132
3133         <listitem>
3134           <para>Define cache location and size</para>
3135         </listitem>
3136
3137         <listitem>
3138           <para>Create the <emphasis role="bold">/afs</emphasis> directory and start the Cache Manager</para>
3139         </listitem>
3140       </orderedlist></para>
3141
3142     <indexterm>
3143       <primary>Distribution</primary>
3144
3145       <secondary>copying client files from</secondary>
3146
3147       <tertiary>first AFS machine</tertiary>
3148     </indexterm>
3149
3150     <indexterm>
3151       <primary>first AFS machine</primary>
3152
3153       <secondary>copying</secondary>
3154
3155       <tertiary>client files to local disk</tertiary>
3156     </indexterm>
3157
3158     <indexterm>
3159       <primary>copying</primary>
3160
3161       <secondary>client files to local disk</secondary>
3162
3163       <tertiary>first AFS machine</tertiary>
3164     </indexterm>
3165   </sect1>
3166
3167   <sect1 id="HDRWQ64">
3168     <title>Copying Client Files to the Local Disk</title>
3169
3170     <para>You need only undertake the steps in this section, if you are using
3171     a tar file distribution, or one built from scratch. Packaged distributions,
3172     such as RPMs or DEBs will already have installed the necessary files in
3173     the correct locations.</para>
3174
3175     <para>Before installing and configuring the AFS client, copy the necessary files from the tarball to the local <emphasis
3176     role="bold">/usr/vice/etc</emphasis> directory. <orderedlist>
3177         <listitem>
3178           <para>If you have not already done so, unpack the distribution 
3179           tarball for this machine's system type into a suitable location on 
3180           the filesystem, such as <emphasis role="bold">/tmp/afsdist</emphasis>.
3181           If you use a different location, substitue that in the examples that 
3182           follow.</para>
3183         </listitem>
3184
3185         <listitem>
3186           <para>Copy files to the local <emphasis role="bold">/usr/vice/etc</emphasis> directory.</para>
3187
3188           <para>This step places a copy of the AFS initialization script (and related files, if applicable) into the <emphasis
3189           role="bold">/usr/vice/etc</emphasis> directory. In the preceding instructions for incorporating AFS into the kernel, you
3190           copied the script directly to the operating system's conventional location for initialization files. When you incorporate
3191           AFS into the machine's startup sequence in a later step, you can choose to link the two files.</para>
3192
3193           <para>On some system types that use a dynamic kernel loader program, you previously copied AFS library files into a
3194           subdirectory of the <emphasis role="bold">/usr/vice/etc</emphasis> directory. On other system types, you copied the
3195           appropriate AFS library file directly to the directory where the operating system accesses it. The following commands do
3196           not copy or recopy the AFS library files into the <emphasis role="bold">/usr/vice/etc</emphasis> directory, because on
3197           some system types the library files consume a large amount of space. If you want to copy them, add the <emphasis
3198           role="bold">-r</emphasis> flag to the first <emphasis role="bold">cp</emphasis> command and skip the second <emphasis
3199           role="bold">cp</emphasis> command.</para>
3200
3201           <programlisting>
3202    # <emphasis role="bold">cd /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/root.client/usr/vice/etc</emphasis>
3203    # <emphasis role="bold">cp -p  *  /usr/vice/etc</emphasis>
3204    # <emphasis role="bold">cp -rp  C  /usr/vice/etc</emphasis>
3205 </programlisting>
3206         </listitem>
3207       </orderedlist></para>
3208
3209     <indexterm>
3210       <primary>cell name</primary>
3211
3212       <secondary>setting in client ThisCell file</secondary>
3213
3214       <tertiary>first AFS machine</tertiary>
3215     </indexterm>
3216
3217     <indexterm>
3218       <primary>setting</primary>
3219
3220       <secondary>cell name in client ThisCell file</secondary>
3221
3222       <tertiary>first AFS machine</tertiary>
3223     </indexterm>
3224
3225     <indexterm>
3226       <primary>first AFS machine</primary>
3227
3228       <secondary>ThisCell file (client)</secondary>
3229     </indexterm>
3230
3231     <indexterm>
3232       <primary>first AFS machine</primary>
3233
3234       <secondary>cell membership, defining</secondary>
3235
3236       <tertiary>for client processes</tertiary>
3237     </indexterm>
3238
3239     <indexterm>
3240       <primary>usr/vice/etc/ThisCell</primary>
3241
3242       <see>ThisCell file (client)</see>
3243     </indexterm>
3244
3245     <indexterm>
3246       <primary>ThisCell file (client)</primary>
3247
3248       <secondary>first AFS machine</secondary>
3249     </indexterm>
3250
3251     <indexterm>
3252       <primary>files</primary>
3253
3254       <secondary>ThisCell (client)</secondary>
3255     </indexterm>
3256   </sect1>
3257
3258   <sect1 id="HDRWQ65">
3259     <title>Defining Cell Membership for Client Processes</title>
3260
3261     <para>Every AFS client machine has a copy of the <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> file on its local disk
3262     to define the machine's cell membership for the AFS client programs that run on it. The <emphasis
3263     role="bold">ThisCell</emphasis> file you created in the <emphasis role="bold">/usr/afs/etc</emphasis> directory (in <link
3264     linkend="HDRWQ51">Defining Cell Name and Membership for Server Processes</link>) is used only by server processes.</para>
3265
3266     <para>Among other functions, the <emphasis role="bold">ThisCell</emphasis> file on a client machine determines the following:
3267     <itemizedlist>
3268         <listitem>
3269           <para>The cell in which users gain tokens when they log onto the 
3270           machine, assuming it is using an AFS-modified login utility</para>
3271         </listitem>
3272
3273         <listitem>
3274           <para>The cell in which users gain tokens by default when they issue
3275           the <emphasis role="bold">aklog</emphasis> command</para>
3276         </listitem>
3277
3278         <listitem>
3279           <para>The cell membership of the AFS server processes that the AFS 
3280           command interpreters on this machine contact by default</para>
3281         </listitem>
3282       </itemizedlist> 
3283     <orderedlist>
3284         <listitem>
3285           <para>Change to the <emphasis role="bold">/usr/vice/etc</emphasis> directory and remove the symbolic link created in <link
3286           linkend="HDRWQ50">Starting the BOS Server</link>. <programlisting>
3287    # <emphasis role="bold">cd /usr/vice/etc</emphasis>
3288    # <emphasis role="bold">rm ThisCell</emphasis>
3289 </programlisting></para>
3290         </listitem>
3291
3292         <listitem>
3293           <para>Create the <emphasis role="bold">ThisCell</emphasis> file as a copy of the <emphasis
3294           role="bold">/usr/afs/etc/ThisCell</emphasis> file. Defining the same local cell for both server and client processes leads
3295           to the most consistent AFS performance. <programlisting>
3296    # <emphasis role="bold">cp  /usr/afs/etc/ThisCell  ThisCell</emphasis>
3297 </programlisting></para>
3298         </listitem>
3299       </orderedlist></para>
3300
3301     <indexterm>
3302       <primary>database server machine</primary>
3303
3304       <secondary>entry in client CellServDB file</secondary>
3305
3306       <tertiary>on first AFS machine</tertiary>
3307     </indexterm>
3308
3309     <indexterm>
3310       <primary>usr/vice/etc/CellServDB</primary>
3311
3312       <see>CellServDB file (client)</see>
3313     </indexterm>
3314
3315     <indexterm>
3316       <primary>CellServDB file (client)</primary>
3317
3318       <secondary>creating</secondary>
3319
3320       <tertiary>on first AFS machine</tertiary>
3321     </indexterm>
3322
3323     <indexterm>
332