mention the openafs-robotest project
[openafs-wiki.git] / InstallingtheFirstAFSMachine.mdwn
1 <div>
2   <ul>
3     <li><a href="#Installing the First AFS Machine"> Installing the First AFS Machine</a></li>
4     <li><a href="#Overview: Installing Server Func"> Overview: Installing Server Functionality</a></li>
5     <li><a href="#Choosing the First AFS Machine"> Choosing the First AFS Machine</a></li>
6     <li><a href="#Performing Platform-Specific Pro"> Performing Platform-Specific Procedures</a></li>
7     <li><a href="#Getting Started on AIX Systems"> Getting Started on AIX Systems</a><ul>
8         <li><a href="#Loading AFS into the AIX Kernel"> Loading AFS into the AIX Kernel</a></li>
9         <li><a href="#Replacing the fsck Program Helpe"> Replacing the fsck Program Helper on AIX Systems</a></li>
10         <li><a href="#Configuring Server Volumes on AI"> Configuring Server Volumes on AIX Systems</a></li>
11       </ul>
12     </li>
13     <li><a href="#Getting Started on Digital UNIX"> Getting Started on Digital UNIX Systems</a><ul>
14         <li><a href="#Loading AFS into the Digital UNI">Loading AFS into the Digital UNIX Kernel</a></li>
15         <li><a href="#Replacing the fsck Program on Di"> Replacing the fsck Program on Digital UNIX Systems</a></li>
16         <li><a href="#Configuring Server Volumes on Di"> Configuring Server Volumes on Digital UNIX Systems</a></li>
17       </ul>
18     </li>
19     <li><a href="#Getting Started on HP-UX Systems"> Getting Started on HP-UX Systems</a><ul>
20         <li><a href="#Building AFS into the HP-UX Kern"> Building AFS into the HP-UX Kernel</a></li>
21         <li><a href="#Configuring the AFS-modified fsc"> Configuring the AFS-modified fsck Program on HP-UX Systems</a></li>
22         <li><a href="#Configuring Server Volumes on HP"> Configuring Server Volumes on HP-UX Systems</a></li>
23       </ul>
24     </li>
25     <li><a href="#Getting Started on IRIX Systems"> Getting Started on IRIX Systems</a><ul>
26         <li><a href="#Loading AFS into the IRIX Kernel"> Loading AFS into the IRIX Kernel</a></li>
27         <li><a href="#Configuring Server Volumes on IR"> Configuring Server Volumes on IRIX Systems</a></li>
28       </ul>
29     </li>
30     <li><a href="#Getting Started on Linux Systems"> Getting Started on Linux Systems</a><ul>
31         <li><a href="#Loading AFS into the Linux Kerne"> Loading AFS into the Linux Kernel</a></li>
32         <li><a href="#Configuring Server Volumes on Li"> Configuring Server Volumes on Linux Systems</a></li>
33       </ul>
34     </li>
35     <li><a href="#Getting Started on Solaris Syste"> Getting Started on Solaris Systems</a><ul>
36         <li><a href="#Loading AFS into the Solaris Ker"> Loading AFS into the Solaris Kernel</a></li>
37         <li><a href="#Configuring the AFS-modified fsc"> Configuring the AFS-modified fsck Program on Solaris Systems</a></li>
38         <li><a href="#Configuring Server Partitions on"> Configuring Server Partitions on Solaris Systems</a></li>
39         <li><a href="#Enabling AFS Login on Solaris Sy"> Enabling AFS Login on Solaris Systems</a></li>
40       </ul>
41     </li>
42     <li><a href="#Starting the BOS Server"> Starting the BOS Server</a></li>
43     <li><a href="#Defining Cell Name and Membershi"> Defining Cell Name and Membership for Server Processes</a></li>
44     <li><a href="#Starting the Database Server Pro"> Starting the Database Server Processes</a></li>
45     <li><a href="#Initializing Cell Security"> Initializing Cell Security</a></li>
46     <li><a href="#Starting the File Server, Volume"> Starting the File Server, Volume Server, and Salvager</a></li>
47     <li><a href="#Starting the Server Portion of t"> Starting the Server Portion of the Update Server</a></li>
48     <li><a href="#Starting the Controller for NTPD"> Starting the Controller for NTPD</a></li>
49     <li><a href="#Overview: Installing Client Func"> Overview: Installing Client Functionality</a><ul>
50         <li><a href="#Copying Client Files to the Loca"> Copying Client Files to the Local Disk</a></li>
51         <li><a href="#Defining Cell Membership for Cli"> Defining Cell Membership for Client Processes</a></li>
52         <li><a href="#Creating the Client _CellServDB"> Creating the Client CellServDB File</a></li>
53         <li><a href="#Configuring the Cache"> Configuring the Cache</a></li>
54         <li><a href="#Configuring the Cache Manager"> Configuring the Cache Manager</a></li>
55       </ul>
56     </li>
57     <li><a href="#Overview: Completing the Install"> Overview: Completing the Installation of the First AFS Machine</a><ul>
58         <li><a href="#Verifying the AFS Initialization"> Verifying the AFS Initialization Script</a></li>
59         <li><a href="#On AIX systems:"> On AIX systems:</a></li>
60         <li><a href="#On Digital UNIX systems:"> On Digital UNIX systems:</a></li>
61         <li><a href="#On HP-UX systems:"> On HP-UX systems:</a></li>
62         <li><a href="#On IRIX systems:"> On IRIX systems:</a></li>
63         <li><a href="#On Linux systems:"> On Linux systems:</a></li>
64         <li><a href="#On Solaris systems:"> On Solaris systems:</a></li>
65       </ul>
66     </li>
67     <li><a href="#Configuring the Top Levels of th"> Configuring the Top Levels of the AFS Filespace</a></li>
68     <li><a href="#Storing AFS Binaries in AFS"> Storing AFS Binaries in AFS</a></li>
69     <li><a href="#The AFS distribution includes th"> The AFS distribution includes the following documents:</a></li>
70     <li><a href="#Storing System Binaries in AFS"> Storing System Binaries in AFS</a></li>
71     <li><a href="#Enabling Access to Foreign Cells"> Enabling Access to Foreign Cells</a></li>
72     <li><a href="#Improving Cell Security"> Improving Cell Security</a></li>
73     <li><a href="#Controlling root Access"> Controlling root Access</a><ul>
74         <li><a href="#Controlling System Administrator"> Controlling System Administrator Access</a></li>
75         <li><a href="#Protecting Sensitive AFS Directo"> Protecting Sensitive AFS Directories</a></li>
76       </ul>
77     </li>
78     <li><a href="#Removing Client Functionality"> Removing Client Functionality</a></li>
79   </ul>
80 </div>
81
82 # <a name="Installing the First AFS Machine"></a> Installing the First AFS Machine
83
84 This chapter describes how to install the first AFS machine in your cell, configuring it as both a file server machine and a client machine. After completing all procedures in this chapter, you can remove the client functionality if you wish, as described in Removing Client Functionality.
85
86 To install additional file server machines after completing this chapter, see Installing Additional Server Machines.
87
88 To install additional client machines after completing this chapter, see Installing Additional Client Machines. Requirements and Configuration Decisions
89
90 The instructions in this chapter assume that you meet the following requirements.
91
92 - You are logged onto the machine's console as the local superuser root
93
94 - A standard version of one of the operating systems supported by the current version of AFS is running on the machine
95
96 - You can access the data on the AFS CD-ROMs, either through a local CD drive or via an NFS mount of a CD drive attached to a machine that is accessible by network
97
98 You must make the following configuration decisions while installing the first AFS machine. To speed the installation itself, it is best to make the decisions before beginning. See the chapter in the IBM AFS Administration Guide about issues in cell administration and configuration for detailed guidelines.
99
100 - Select the first AFS machine
101
102 - Select the cell name
103
104 - Decide which partitions or logical volumes to configure as AFS server partitions, and choose the directory names on which to mount them
105
106 - Decide whether to use the standard AFS authentication and authorization software or Kerberos as obtained from another source. On several system types, the decision determines how you incorporate AFS into the machine's authentication system. If you wish to use Kerberos, contact the AFS Product Support group now to learn about how you must modify the installation procedure.
107
108 - Decide how big to make the client cache
109
110 - Decide how to configure the top levels of your cell's AFS filespace
111
112 This chapter is divided into three large sections corresponding to the three parts of installing the first AFS machine. Perform all of the steps in the order they appear. Each functional section begins with a summary of the procedures to perform. The sections are as follows:
113
114 - Installing server functionality (begins in Overview: Installing Server Functionality)
115
116 - Installing client functionality (begins in Overview: Installing Client Functionality)
117
118 - Configuring your cell's filespace, establishing further security mechanisms, and enabling access to foreign cells (begins in Overview: Completing the Installation of the First AFS Machine)
119
120 # <a name="Overview: Installing Server Func"></a> Overview: Installing Server Functionality
121
122 In the first phase of installing your cell's first AFS machine, you install file server and database server functionality by performing the following procedures:
123
124 1. Choose which machine to install as the first AFS machine
125
126 1. Create AFS-related directories on the local disk
127
128 1. Incorporate AFS modifications into the machine's kernel
129
130 1. Configure partitions or logical volumes for storing AFS volumes
131
132 1. On some system types, install and configure an AFS-modified version of the fsck program
133
134 1. If the machine is to remain a client machine, incorporate AFS into its authentication system
135
136 1. Start the Basic [[OverSeer]] (BOS) Server
137
138 1. Define the cell name and the machine's cell membership
139
140 1. Start the database server processes: Authentication Server, Backup Server, Protection Server, and Volume Location (VL) Server
141
142 10. Configure initial security mechanisms
143
144 11. Start the fs process, which incorporates three component processes: the File Server, Volume Server, and Salvager
145
146 12. Start the server portion of the Update Server
147
148 13. Start the controller process (called runntp) for the Network Time Protocol Daemon, which synchronizes machine clocks
149
150 # <a name="Choosing the First AFS Machine"></a> Choosing the First AFS Machine
151
152 The first AFS machine you install must have sufficient disk space to store AFS volumes. To take best advantage of AFS's capabilities, store client-side binaries as well as user files in volumes. When you later install additional file server machines in your cell, you can distribute these volumes among the different machines as you see fit.
153
154 These instructions configure the first AFS machine as a database server machine, the binary distribution machine for its system type, and the cell's system control machine. For a description of these roles, see the IBM AFS Administration Guide.
155
156 Installation of additional machines is simplest if the first machine has the lowest IP address of any database server machine you currently plan to install. If you later install database server functionality on a machine with a lower IP address, you must first update the /usr/vice/etc/CellServDB file on all of your cell's client machines. For more details, see Installing Database Server Functionality. Creating AFS Directories
157
158 Create the /usr/afs and /usr/vice/etc directories on the local disk, to house server and client files respectively. Subsequent instructions copy files from the AFS CD-ROM into them. Create the /cdrom directory as a mount point for CD-ROMs, if it does not already exist.
159
160        # mkdir /usr/afs
161
162        # mkdir -p /usr/vice/etc
163
164        # mkdir /cdrom
165
166 # <a name="Performing Platform-Specific Pro"></a> Performing Platform-Specific Procedures
167
168 Several of the initial procedures for installing a file server machine differ for each system type. For convenience, the following sections group them together for each system type:
169
170 - Incorporate AFS modifications into the kernel.
171
172 The kernel on every AFS file server and client machine must incorporate AFS extensions. On machines that use a dynamic kernel module loader, it is conventional to alter the machine's initialization script to load the AFS extensions at each reboot.
173
174 - Configure server partitions or logical volumes to house AFS volumes.
175
176 Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes (for convenience, the documentation hereafter refers to partitions only). Each server partition is mounted at a directory named /vicepxx, where xx is one or two lowercase letters. By convention, the first 26 partitions are mounted on the directories called /vicepa through /vicepz, the 27th one is mounted on the /vicepaa directory, and so on through /vicepaz and /vicepba, continuing up to the index corresponding to the maximum number of server partitions supported in the current version of AFS (which is specified in the IBM AFS Release Notes).
177
178 The /vicepxx directories must reside in the file server machine's root directory, not in one of its subdirectories (for example, /usr/vicepa is not an acceptable directory location).
179
180 You can also add or remove server partitions on an existing file server machine. For instructions, see the chapter in the IBM AFS Administration Guide about maintaining server machines.
181
182 <dl>
183   <dd>
184     <dl>
185       <dt> Note</dt>
186       <dd> Not all file system types supported by an operating system are necessarily supported as AFS server partitions. For possible restrictions, see the IBM AFS Release Notes. </dd>
187     </dl>
188   </dd>
189 </dl>
190
191 - On some system types, install and configure a modified fsck program which recognizes the structures that the File Server uses to organize volume data on AFS server partitions. The fsck program provided with the operating system does not understand the AFS data structures, and so removes them to the lost+found directory.
192
193 - If the machine is to remain an AFS client machine, modify the machine's authentication system so that users obtain an AFS token as they log into the local file system. Using AFS is simpler and more convenient for your users if you make the modifications on all client machines. Otherwise, users must perform a two-step login procedure (login to the local file system and then issue the klog command). For further discussion of AFS authentication, see the chapter in the IBM AFS Administration Guide about cell configuration and administration issues.
194
195 # <a name="Getting Started on AIX Systems"></a> Getting Started on AIX Systems
196
197 Begin by running the AFS initialization script to call the AIX kernel extension facility, which dynamically loads AFS modifications into the kernel. Then use the SMIT program to configure partitions for storing AFS volumes, and replace the AIX fsck program helper with a version that correctly handles AFS volumes. If the machine is to remain an AFS client machine, incorporate AFS into the AIX secondary authentication system.
198
199 ## <a name="Loading AFS into the AIX Kernel"></a> Loading AFS into the AIX Kernel
200
201 [[Loading AFS into the AIX Kernel|LoadingAFSIntoTheAIXKernel]]
202
203 ## <a name="Replacing the fsck Program Helpe"></a> Replacing the fsck Program Helper on AIX Systems
204
205 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
206
207 [[Replacing the fsck Program Helper on AIX Systems|ReplacingTheFsckProgramHelperOnAIXSystems]]
208
209 ## <a name="Configuring Server Volumes on AI"></a> Configuring Server Volumes on AIX Systems
210
211 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
212
213 [[Configuring Server Volumes on AIX|ConfiguringServerVolumesOnAIX]]
214
215 If you plan to retain client functionality on this machine after completing the installation, proceed to [[Enabling AFS Login on AIX Systems|EnablingAFSLoginOnAIXSystems]]. Otherwise, proceed to Starting the BOS Server.
216
217 # <a name="Getting Started on Digital UNIX"></a><a name="Getting Started on Digital UNIX "></a> Getting Started on Digital UNIX Systems
218
219 Begin by either building AFS modifications into a new static kernel or by setting up to dynamically load the AFS kernel module. Then create partitions for storing AFS volumes, and replace the Digital UNIX fsck program with a version that correctly handles AFS volumes. If the machine is to remain an AFS client machine, incorporate AFS into the machine's Security Integration Architecture (SIA) matrix.
220
221 ## <a name="Loading AFS into the Digital UNI"></a> Loading AFS into the Digital UNIX Kernel
222
223 [[Building AFS into the Digital UNIX Kernel|BuildingAFSIntoTheDigitalUNIXKernel]]
224
225 ## <a name="Replacing the fsck Program on Di"></a> Replacing the fsck Program on Digital UNIX Systems
226
227 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
228
229 [[Replacing the fsck Program on Digital UNIX Systems|ReplacingTheFsckProgramOnDigitalUNIXSystems]]
230
231 ## <a name="Configuring Server Volumes on Di"></a> Configuring Server Volumes on Digital UNIX Systems
232
233 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
234
235 [[Configuring Server Volumes on Digital UNIX|ConfiguringServerVolumesOnDigitalUNIX]]
236
237 If you plan to retain client functionality on this machine after completing the installation, proceed to [[Enabling AFS Login on Digital UNIX Systems|EnablingAFSLoginOnDigitalUNIXSystems]]. Otherwise, proceed to Starting the BOS Server.
238
239 # <a name="Getting Started on HP-UX Systems"></a> Getting Started on HP-UX Systems
240
241 Begin by building AFS modifications into a new kernel; HP-UX does not support dynamic loading. Then create partitions for storing AFS volumes, and install and configure the AFS-modified fsck program to run on AFS server partitions. If the machine is to remain an AFS client machine, incorporate AFS into the machine's Pluggable Authentication Module (PAM) scheme.
242
243 ## <a name="Building AFS into the HP-UX Kern"></a> Building AFS into the HP-UX Kernel
244
245 [[Building AFS into the HP-UX Kernel|BuildingAFSIntoTheHP-UXKernel]]
246
247 ## <a name="Configuring the AFS-modified fsc"></a> Configuring the AFS-modified fsck Program on HP-UX Systems
248
249 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
250
251 [[Configuring the AFS-modified fsck Program on HP-UX Systems|ConfiguringTheAFS-modifiedFsckProgramOnHP-UXSystems]]
252
253 ## <a name="Configuring Server Volumes on HP"></a> Configuring Server Volumes on HP-UX Systems
254
255 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
256
257 [[Configuring Server Volumes on HP-UX|ConfiguringServerVolumesOnHP-UX]]
258
259 If you plan to retain client functionality on this machine after completing the installation, proceed to [[Enabling AFS Login on HP-UX Systems|EnablingAFSLoginOnHP-UXSystems]]. Otherwise, proceed to Starting the BOS Server.
260
261 # <a name="Getting Started on IRIX Systems"></a> Getting Started on IRIX Systems
262
263 Begin by incorporating AFS modifications into the kernel. Either use the ml dynamic loader program, or build a static kernel. Then configure partitions to house AFS volumes. AFS supports use of both EFS and XFS partitions for housing AFS volumes. SGI encourages use of XFS partitions.
264
265 You do not need to replace IRIX fsck program, because the version that SGI distributes handles AFS volumes properly.
266
267 ## <a name="Loading AFS into the IRIX Kernel"></a> Loading AFS into the IRIX Kernel
268
269 [[Loading AFS into the IRIX Kernel|LoadingAFSIntoTheIRIXKernel]]
270
271 Proceed to Configuring Server Partitions on IRIX Systems.
272
273 ## <a name="Configuring Server Volumes on IR"></a> Configuring Server Volumes on IRIX Systems
274
275 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
276
277 [[Configuring Server Volumes on IRIX|ConfiguringServerVolumesOnIRIX]]
278
279 If you plan to retain client functionality on this machine after completing the installation, proceed to [[Enabling AFS Login on IRIX Systems|EnablingAFSLoginOnIRIXSystems]]. Otherwise, proceed to Starting the BOS Server.
280
281 # <a name="Getting Started on Linux Systems"></a> Getting Started on Linux Systems
282
283 Begin by running the AFS initialization script to call the insmod program, which dynamically loads AFS modifications into the kernel. Then create partitions for storing AFS volumes. You do not need to replace the Linux fsck program. If the machine is to remain an AFS client machine, incorporate AFS into the machine's Pluggable Authentication Module (PAM) scheme.
284
285 ## <a name="Loading AFS into the Linux Kerne"></a> Loading AFS into the Linux Kernel
286
287 [[Loading AFS into the Linux Kernel|LoadingAFSIntoTheLinuxKernel]]
288
289 ## <a name="Configuring Server Volumes on Li"></a> Configuring Server Volumes on Linux Systems
290
291 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
292
293 [[Configuring Server Volumes On Linux|ConfiguringServerVolumesOnLinux]]
294
295 If you plan to retain client functionality on this machine after completing the installation, proceed to [[Enabling AFS Login on Linux Systems|EnablingAFSLoginOnLinuxSystems]]. Otherwise, proceed to Starting the BOS Server.
296
297 # <a name="Getting Started on Solaris Syste"></a> Getting Started on Solaris Systems
298
299 Begin by running the AFS initialization script to call the modload program distributed by Sun Microsystems, which dynamically loads AFS modifications into the kernel. Then create partitions for storing AFS volumes, and install and configure the AFS-modified fsck program to run on AFS server partitions. If the machine is to remain an AFS client machine, incorporate AFS into the machine's Pluggable Authentication Module (PAM) scheme.
300
301 ## <a name="Loading AFS into the Solaris Ker"></a> Loading AFS into the Solaris Kernel
302
303 [[Loading AFS into the Solaris Kernel|LoadingAFSIntoTheSolarisKernel]]
304
305 ## <a name="Configuring the AFS-modified fsc"></a> Configuring the AFS-modified fsck Program on Solaris Systems
306
307 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
308
309 [[Configuring the AFS-modified fsck Program on Solaris Systems|ConfiguringTheAFS-modifiedFsckProgramOnSolarisSystems]]
310
311 ## <a name="Configuring Server Partitions on"></a> Configuring Server Partitions on Solaris Systems
312
313 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
314
315 [[Configuring Server Volumes On Solaris|ConfiguringServerVolumesOnSolaris]]
316
317 If you plan to retain client functionality on this machine after completing the installation, proceed to Enabling AFS Login on Solaris Systems. Otherwise, proceed to Starting the BOS Server.
318
319 ## <a name="Enabling AFS Login on Solaris Sy"></a> Enabling AFS Login on Solaris Systems
320
321 Note: If you plan to remove client functionality from this machine after completing the installation, skip this section and proceed to Starting the BOS Server.
322
323 [[Enabling AFS Login on Solaris Systems|EnablingAFSLoginOnSolarisSystems]]
324
325 Proceed to Starting the BOS Server (or if referring to these instructions while installing an additional file server machine, return to Starting Server Programs).
326
327 # <a name="Starting the BOS Server"></a> Starting the BOS Server
328
329 You are now ready to start the AFS server processes on this machine. Begin by copying the AFS server binaries from the CD-ROM to the conventional local disk location, the /usr/afs/bin directory. The following instructions also create files in other subdirectories of the /usr/afs directory.
330
331 Then issue the bosserver command to initialize the Basic [[OverSeer]] (BOS) Server, which monitors and controls other AFS server processes on its server machine. Include the -noauth flag to disable authorization checking. Because you have not yet configured your cell's AFS authentication and authorization mechanisms, the BOS Server cannot perform authorization checking as it does during normal operation. In no-authorization mode, it does not verify the identity or privilege of the issuer of a bos command, and so performs any operation for anyone.
332
333 Disabling authorization checking gravely compromises cell security. You must complete all subsequent steps in one uninterrupted pass and must not leave the machine unattended until you restart the BOS Server with authorization checking enabled, in Verifying the AFS Initialization Script.
334
335 As it initializes for the first time, the BOS Server creates the following directories and files, setting the owner to the local superuser root and the mode bits to limit the ability to write (and in some cases, read) them. For a description of the contents and function of these directories and files, see the chapter in the IBM AFS Administration Guide about administering server machines. For further discussion of the mode bit settings, see Protecting Sensitive AFS Directories.
336
337 - /usr/afs/db
338
339 - /usr/afs/etc/CellServDB
340
341 - /usr/afs/etc/ThisCell
342
343 - /usr/afs/local
344
345 - /usr/afs/logs
346
347 The BOS Server also creates symbolic links called /usr/vice/etc/ThisCell and /usr/vice/etc/CellServDB to the corresponding files in the /usr/afs/etc directory. The AFS command interpreters consult the [[CellServDB]] and [[ThisCell]] files in the /usr/vice/etc directory because they generally run on client machines. On machines that are AFS servers only (as this machine currently is), the files reside only in the /usr/afs/etc directory; the links enable the command interpreters to retrieve the information they need. Later instructions for installing the client functionality replace the links with actual files.
348
349 1. On the local /cdrom directory, mount the AFS CD-ROM for this machine's system type, if it is not already. For instructions on mounting CD-ROMs (either locally or remotely via NFS), consult the operating system documentation.
350
351 1. Copy files from the CD-ROM to the local /usr/afs directory.
352
353        # cd /cdrom/sysname/root.server/usr/afs
354
355        # cp -rp  *  /usr/afs
356
357 1. Issue the bosserver command. Include the -noauth flag to disable authorization checking.
358
359        # /usr/afs/bin/bosserver -noauth &
360
361 1. Verify that the BOS Server created /usr/vice/etc/ThisCell and /usr/vice/etc/CellServDB as symbolic links to the corresponding files in the /usr/afs/etc directory.
362
363        # ls -l  /usr/vice/etc
364
365 If either or both of /usr/vice/etc/ThisCell and /usr/vice/etc/CellServDB do not exist, or are not links, issue the following commands.
366
367        # cd /usr/vice/etc
368
369        # ln -s /usr/afs/etc/ThisCell
370
371        # ln -s /usr/afs/etc/CellServDB
372
373 # <a name="Defining Cell Name and Membershi"></a> Defining Cell Name and Membership for Server Processes
374
375 Now assign your cell's name. The chapter in the IBM AFS Administration Guide about cell configuration and administration issues discusses the important considerations, explains why changing the name is difficult, and outlines the restrictions on name format. Two of the most important restrictions are that the name cannot include uppercase letters or more than 64 characters.
376
377 Use the bos setcellname command to assign the cell name. It creates two files:
378
379 - /usr/afs/etc/ThisCell, which defines this machine's cell membership
380
381 - /usr/afs/etc/CellServDB, which lists the cell's database server machines; the machine named on the command line is placed on the list automatically
382
383 Note: In the following and every instruction in this guide, for the machine name argument substitute the fully-qualified hostname (such as fs1.abc.com) of the machine you are installing. For the cell name argument substitute your cell's complete name (such as abc.com).
384
385 1. Issue the bos setcellname command to set the cell name.
386
387        # cd /usr/afs/bin
388
389        # ./bos setcellname <machine name> <cell name> -noauth
390
391 Because you are not authenticated and authorization checking is disabled, the bos command interpreter possibly produces error messages about being unable to obtain tickets and running unauthenticated. You can safely ignore the messages.
392
393 1. Issue the bos listhosts command to verify that the machine you are installing is now registered as the cell's first database server machine.
394
395        # ./bos listhosts <machine name> -noauth
396        Cell name is cell_name
397            Host 1 is machine_name
398
399 # <a name="Starting the Database Server Pro"></a> Starting the Database Server Processes
400
401 Next use the bos create command to create entries for the four database server processes in the /usr/afs/local/BosConfig file and start them running. The four processes run on database server machines only:
402
403 - The Authentication Server (the kaserver process) maintains the Authentication Database
404
405 - The Backup Server (the buserver process) maintains the Backup Database
406
407 - The Protection Server (the ptserver process) maintains the Protection Database
408
409 - The Volume Location (VL) Server (the vlserver process) maintains the Volume Location Database (VLDB)
410
411 Note: AFS's authentication and authorization software is based on algorithms and other procedures known as Kerberos, as originally developed by Project Athena at the Massachusetts Institute of Technology. Some cells choose to replace the AFS Authentication Server and other security-related protocols with Kerberos as obtained directly from Project Athena or other sources. If you wish to do this, contact the AFS Product Support group now to learn about necessary modifications to the installation.
412
413 The remaining instructions in this chapter include the -cell argument on all applicable commands. Provide the cell name you assigned in Defining Cell Name and Membership for Server Processes. If a command appears on multiple lines, it is only for legibility.
414
415 1. Issue the bos create command to start the Authentication Server. The current working directory is still /usr/afs/bin.
416
417        # ./bos create <machine name> kaserver simple /usr/afs/bin/kaserver  \
418                       -cell <cell name>  -noauth
419
420 You can safely ignore the messages that tell you to add Kerberos to the /etc/services file; AFS uses a default value that makes the addition unnecessary. You can also ignore messages about the failure of authentication.
421
422 1. Issue the bos create command to start the Backup Server.
423
424        # ./bos create <machine name> buserver simple /usr/afs/bin/buserver  \
425                       -cell <cell name>  -noauth
426
427 1. Issue the bos create command to start the Protection Server.
428
429        # ./bos create <machine name> ptserver simple /usr/afs/bin/ptserver  \
430                       -cell <cell name>  -noauth
431
432 1. Issue the bos create command to start the VL Server.
433
434        # ./bos create <machine name> vlserver simple /usr/afs/bin/vlserver  \
435                       -cell <cell name>  -noauth
436
437 # <a name="Initializing Cell Security"></a> Initializing Cell Security
438
439 Now initialize the cell's security mechanisms. Begin by creating the following two initial entries in the Authentication Database:
440
441 - A generic administrative account, called admin by convention. If you choose to assign a different name, substitute it throughout the remainder of this document.
442
443 After you complete the installation of the first machine, you can continue to have all administrators use the admin account, or you can create a separate administrative account for each of them. The latter scheme implies somewhat more overhead, but provides a more informative audit trail for administrative operations.
444
445 - The entry for AFS server processes, called afs. No user logs in under this identity, but the Authentication Server's Ticket Granting Service (TGS) module uses the associated key to encrypt the server tickets that it grants to AFS clients for presentation to server processes during mutual authentication. (The chapter in the IBM AFS Administration Guide about cell configuration and administration describes the role of server encryption keys in mutual authentication.)
446
447 In Step 7, you also place the initial AFS server encryption key into the /usr/afs/etc/KeyFile file. The AFS server processes refer to this file to learn the server encryption key when they need to decrypt server tickets.
448
449 You also issue several commands that enable the new admin user to issue privileged commands in all of the AFS suites.
450
451 The following instructions do not configure all of the security mechanisms related to the AFS Backup System. See the chapter in the IBM AFS Administration Guide about configuring the Backup System.
452
453 1. Enter kas interactive mode. Because the machine is in no-authorization checking mode, include the -noauth flag to suppress the Authentication Server's usual prompt for a password.
454
455        # kas  -cell <cell name> -noauth
456        ka>
457
458 1. Issue the kas create command to create Authentication Database entries called admin and afs.
459
460 Do not provide passwords on the command line. Instead provide them as afs\_passwd and admin\_passwd in response to the kas command interpreter's prompts as shown, so that they do not appear on the standard output stream.
461
462 You need to enter the afs\_passwd string only in this step and in Step 7, so provide a value that is as long and complex as possible, preferably including numerals, punctuation characters, and both uppercase and lowercase letters. Also make the admin\_passwd as long and complex as possible, but keep in mind that administrators need to enter it often. Both passwords must be at least six characters long.
463
464        ka> create afs
465        initial_password:  afs_passwd
466        Verifying, please re-enter initial_password: afs_passwd
467
468        ka> create admin
469        initial_password: admin_passwd
470        Verifying, please re-enter initial_password: admin_passwd
471
472 1. Issue the kas examine command to display the afs entry. The output includes a checksum generated by encrypting a constant with the server encryption key derived from the afs\_passwd string. In Step 8 you issue the bos listkeys command to verify that the checksum in its output matches the checksum in this output.
473
474        ka> examine afs
475        User data for afs
476         key (0) cksum is checksum . . .
477
478 1. Issue the kas setfields command to turn on the ADMIN flag in the admin entry. This enables the admin user to issue privileged kas commands. Then issue the kas examine command to verify that the ADMIN flag appears in parentheses on the first line of the output, as shown in the example.
479
480        ka> setfields admin -flags admin
481
482        ka> examine admin
483        User data for admin (ADMIN) . . .
484
485 1. Issue the kas quit command to leave kas interactive mode.
486
487        ka> quit
488
489 1. Issue the bos adduser command to add the admin user to the /usr/afs/etc/UserList file. This enables the admin user to issue privileged bos and vos commands.
490
491        # ./bos adduser <machine name> admin -cell <cell name> -noauth
492
493 1. Issue the bos addkey command to define the AFS server encryption key in the /usr/afs/etc/KeyFile file.
494
495 Do not provide the password on the command line. Instead provide it as afs\_passwd in response to the bos command interpreter's prompts, as shown. Provide the same string as in Step 2.
496
497        # ./bos addkey <machine name> -kvno 0 -cell <cell name>  -noauth
498        Input key: afs_passwd
499        Retype input key: afs_passwd
500
501 1. Issue the bos listkeys command to verify that the checksum for the new key in the [[KeyFile]] file is the same as the checksum for the key in the Authentication Database's afs entry, which you displayed in Step 3.
502
503        # ./bos listkeys <machine name> -cell <cell name> -noauth
504        key 0 has cksum checksum
505
506 You can safely ignore any error messages indicating that bos failed to get tickets or that authentication failed.
507
508 If the keys are different, issue the following commands, making sure that the afs\_passwd string is the same in each case. The checksum strings reported by the kas examine and bos listkeys commands must match; if they do not, repeat these instructions until they do, using the -kvno argument to increment the key version number each time.
509
510        # ./kas  -cell <cell name> -noauth
511
512        ka> setpassword afs -kvno 1
513        new_password: afs_passwd
514        Verifying, please re-enter initial_password: afs_passwd
515
516        ka> examine afs
517        User data for afs
518         key (1) cksum is checksum . . .
519
520        ka> quit
521
522        # ./bos addkey <machine name> -kvno 1 -cell <cell name> -noauth
523        Input key: afs_passwd
524        Retype input key: afs_passwd
525
526        # ./bos listkeys <machine name> -cell <cell name> -noauth
527        key 1 has cksum checksum
528
529 1. Issue the pts createuser command to create a Protection Database entry for the admin user.
530
531 By default, the Protection Server assigns AFS UID 1 (one) to the admin user, because it is the first user entry you are creating. If the local password file (/etc/passwd or equivalent) already has an entry for admin that assigns it a UNIX UID other than 1, it is best to use the -id argument to the pts createuser command to make the new AFS UID match the existing UNIX UID. Otherwise, it is best to accept the default.
532
533        # ./pts createuser -name admin -cell <cell name> [-id <AFS UID>]  -noauth
534        User admin has id AFS UID
535
536 10. Issue the pts adduser command to make the admin user a member of the system:administrators group, and the pts membership command to verify the new membership. Membership in the group enables the admin user to issue privileged pts commands and some privileged fs commands.
537
538        # ./pts adduser admin system:administrators -cell <cell name> -noauth
539
540        # ./pts membership admin -cell  <cell name> -noauth
541        Groups admin (id: 1) is a member of:
542          system:administrators
543
544 11. Issue the bos restart command with the -all flag to restart the database server processes, so that they start using the new server encryption key.
545
546        # ./bos restart <machine name> -all -cell <cell name> -noauth
547
548 # <a name="Starting the File Server, Volume"></a> Starting the File Server, Volume Server, and Salvager
549
550 Start the fs process, which consists of the File Server, Volume Server, and Salvager (fileserver, volserver and salvager processes).
551
552 1. Issue the bos create command to start the fs process. The command appears here on multiple lines only for legibility.
553
554        # ./bos create  <machine name> fs fs /usr/afs/bin/fileserver   \
555                        /usr/afs/bin/volserver /usr/afs/bin/salvager  \
556                        -cell <cell name>  -noauth
557
558 Sometimes a message about Volume Location Database (VLDB) initialization appears, along with one or more instances of an error message similar to the following:
559
560        FSYNC_clientInit temporary failure (will retry)
561
562 This message appears when the volserver process tries to start before the fileserver process has completed its initialization. Wait a few minutes after the last such message before continuing, to guarantee that both processes have started successfully.
563
564 You can verify that the fs process has started successfully by issuing the bos status command. Its output mentions two proc starts.
565
566        # ./bos status <machine name> fs -long -noauth
567
568 1. Your next action depends on whether you have ever run AFS file server machines in the cell:
569
570 \* If you are installing the first AFS server machine ever in the cell (that is, you are not upgrading the AFS software from a previous version), create the first AFS volume, root.afs.
571
572 For the partition name argument, substitute the name of one of the machine's AFS server partitions (such as /vicepa).
573
574        # ./vos create  <machine name> <partition name> root.afs   \
575                        -cell <cell name>  -noauth
576
577 The Volume Server produces a message confirming that it created the volume on the specified partition. You can ignore error messages indicating that tokens are missing, or that authentication failed.
578
579 \* If there are existing AFS file server machines and volumes in the cell, issue the vos syncvldb and vos syncserv commands to synchronize the VLDB with the actual state of volumes on the local machine. To follow the progress of the synchronization operation, which can take several minutes, use the -verbose flag.
580
581        # ./vos syncvldb <machine name> -cell <cell name> -verbose  -noauth
582
583        # ./vos syncserv <machine name> -cell <cell name> -verbose  -noauth
584
585 You can ignore error messages indicating that tokens are missing, or that authentication failed.
586
587 # <a name="Starting the Server Portion of t"></a> Starting the Server Portion of the Update Server
588
589 Start the server portion of the Update Server (the upserver process), to distribute the contents of directories on this machine to other server machines in the cell. It becomes active when you configure the client portion of the Update Server on additional server machines.
590
591 Distributing the contents of its /usr/afs/etc directory makes this machine the cell's system control machine. The other server machines in the cell run the upclientetc process (an instance of the client portion of the Update Server) to retrieve the configuration files. Use the -crypt argument to the upserver initialization command to specify that the Update Server distributes the contents of the /usr/afs/etc directory only in encrypted form, as shown in the following instruction. Several of the files in the directory, particularly the [[KeyFile]] file, are crucial to cell security and so must never cross the network unencrypted.
592
593 (You can choose not to configure a system control machine, in which case you must update the configuration files in each server machine's /usr/afs/etc directory individually. The bos commands used for this purpose also encrypt data before sending it across the network.)
594
595 Distributing the contents of its /usr/afs/bin directory to other server machines of its system type makes this machine a binary distribution machine. The other server machines of its system type run the upclientbin process (an instance of the client portion of the Update Server) to retrieve the binaries.
596
597 The binaries in the /usr/afs/bin directory are not sensitive, so it is not necessary to encrypt them before transfer across the network. Include the -clear argument to the upserver initialization command to specify that the Update Server distributes the contents of the /usr/afs/bin directory in unencrypted form unless an upclientbin process requests encrypted transfer.
598
599 Note that the server and client portions of the Update Server always mutually authenticate with one another, regardless of whether you use the -clear or -crypt arguments. This protects their communications from eavesdropping to some degree.
600
601 For more information on the upclient and upserver processes, see their reference pages in the IBM AFS Administration Reference. The commands appear on multiple lines here only for legibility.
602
603 1. Issue the bos create command to start the upserver process.
604
605        # ./bos create  <machine name> upserver simple  \
606                  "/usr/afs/bin/upserver  -crypt /usr/afs/etc    \
607                  -clear /usr/afs/bin" -cell <cell name>  -noauth
608
609 # <a name="Starting the Controller for NTPD"></a> Starting the Controller for NTPD
610
611 Keeping the clocks on all server and client machines in your cell synchronized is crucial to several functions, and in particular to the correct operation of AFS's distributed database technology, Ubik. The chapter in the IBM AFS Administration Guide about administering server machines explains how time skew can disturb Ubik's performance and cause service outages in your cell.
612
613 The AFS distribution includes a version of the Network Time Protocol Daemon (NTPD) for synchronizing the clocks on server machines. If a time synchronization program is not already running on the machine, then in this section you start the runntp process to configure NTPD for use with AFS. Note: Do not run the runntp process if NTPD or another time synchronization protocol is already running on the machine. Some versions of some operating systems run a time synchronization program by default, as detailed in the IBM AFS Release Notes.
614
615 Attempting to run multiple instances of the NTPD causes an error. Running NTPD together with another time synchronization protocol is unnecessary and can cause instability in the clock setting.
616
617 If you run the runntp process and your cell has reliable network connectivity to machines outside your cell, then it is conventional to configure the first AFS machine to refer to a time source outside the cell. When you later install the runntp program on other server machines in the cell, it configures NTPD to choose a time source at random from among the database server machines listed in the /usr/afs/etc/CellServDB file. Time synchronization therefore works in a chained manner: this database server machine refers to a time source outside the cell, the database server machines refer to the machine among them that has access to the most accurate time (NTPD itself includes code for determining this), and each non-database server machine refers to a local database server machine chosen at random from the /usr/afs/etc/CellServDB file. If you ever decide to remove database server functionality from this machine, it is best to transfer responsibility for consulting an external time source to a remaining database server machine.
618
619 If your cell does not have network connectivity to external machines, or if the connectivity is not reliable, include the -localclock flag to the runntp command as indicated in the following instructions. The flag tells NTPD to rely on the machine's internal clock when all external time sources are inaccessible. The runntp command has other arguments that are possibly useful given your cell configuration; see the IBM AFS Administration Reference.
620
621 Choosing an appropriate external time source is important, but involves more considerations than can be discussed here. If you need help in selecting a source, contact the AFS Product Support group.
622
623 As the runntp process initializes NTPD, trace messages sometimes appear on the standard output stream. You can ignore them, but they can be informative if you understand how NTPD works.
624
625 1. Issue the bos create command to start the runntp process. For the host argument, substitute the fully-qualified hostname or IP address of one or more machines outside the cell that are to serve as time sources. Separate each name with a space.
626
627 \* If your cell usually has reliable network connectivity to an external time source, use the following command:
628
629        # ./bos create  <machine name>   runntp simple   \
630             "/usr/afs/bin/runntp <host>+"  -cell <cell name>  -noauth
631
632 \* If your cell does not have network connectivity to an external time source, use the following command:
633
634        # ./bos create  <machine name> runntp simple  \
635             "/usr/afs/bin/runntp -localclock"  -cell <cell name>  -noauth
636
637 \* If your cell has network connectivity to an external time source, but the network connection is frequently interrupted, use the following command:
638
639        # ./bos create  <machine name> runntp simple  \
640              "/usr/afs/bin/runntp -localclock <host>+"  \
641              -cell <cell name>  -noauth
642
643 # <a name="Overview: Installing Client Func"></a> Overview: Installing Client Functionality
644
645 The machine you are installing is now an AFS file server machine, database server machine, system control machine, and binary distribution machine. Now make it a client machine by completing the following tasks:
646
647 1. Define the machine's cell membership for client processes
648
649 1. Create the client version of the [[CellServDB]] file
650
651 1. Define cache location and size
652
653 1. Create the /afs directory and start the Cache Manager
654
655 ## <a name="Copying Client Files to the Loca"></a> Copying Client Files to the Local Disk
656
657 Before installing and configuring the AFS client, copy the necessary files from the AFS CD-ROM to the local /usr/vice/etc directory.
658
659 1. On the local /cdrom directory, mount the AFS CD-ROM for this machine's system type, if it is not already. For instructions on mounting CD-ROMs (either locally or remotely via NFS), consult the operating system documentation.
660
661 1. Copy files to the local /usr/vice/etc directory.
662
663 This step places a copy of the AFS initialization script (and related files, if applicable) into the /usr/vice/etc directory. In the preceding instructions for incorporating AFS into the kernel, you copied the script directly to the operating system's conventional location for initialization files. When you incorporate AFS into the machine's startup sequence in a later step, you can choose to link the two files.
664
665 On some system types that use a dynamic kernel loader program, you previously copied AFS library files into a subdirectory of the /usr/vice/etc directory. On other system types, you copied the appropriate AFS library file directly to the directory where the operating system accesses it. The following commands do not copy or recopy the AFS library files into the /usr/vice/etc directory, because on some system types the library files consume a large amount of space. If you want to copy them, add the -r flag to the first cp command and skip the second cp command.
666
667        # cd /cdrom/sun4x_59/dest/root.client/usr/vice/etc
668
669        # cp -p  *  /usr/vice/etc
670
671        # cp -rp  C  /usr/vice/etc
672
673 ## <a name="Defining Cell Membership for Cli"></a> Defining Cell Membership for Client Processes
674
675 Every AFS client machine has a copy of the /usr/vice/etc/ThisCell file on its local disk to define the machine's cell membership for the AFS client programs that run on it. The [[ThisCell]] file you created in the /usr/afs/etc directory (in Defining Cell Name and Membership for Server Processes) is used only by server processes.
676
677 Among other functions, the [[ThisCell]] file on a client machine determines the following:
678
679 \* The cell in which users authenticate when they log onto the machine, assuming it is using an AFS-modified login utility
680
681 \* The cell in which users authenticate by default when they issue the klog command
682
683 \* The cell membership of the AFS server processes that the AFS command interpreters on this machine contact by default
684
685 1. Change to the /usr/vice/etc directory and remove the symbolic link created in Starting the BOS Server.
686
687        # cd /usr/vice/etc
688
689        # rm ThisCell
690
691 1. Create the [[ThisCell]] file as a copy of the /usr/afs/etc/ThisCell file. Defining the same local cell for both server and client processes leads to the most consistent AFS performance.
692
693        # cp  /usr/afs/etc/ThisCell  ThisCell
694
695 ## <a name="Creating the Client _CellServDB"></a><a name="Creating the Client _CellServDB "></a> Creating the Client [[CellServDB]] File
696
697 [[Creating the Client CellServDB File|CreatingTheClientCellServDBFile]]
698
699 ## <a name="Configuring the Cache"></a> Configuring the Cache
700
701 [[Configuring the Cache|ConfiguringTheCache]]
702
703 ## <a name="Configuring the Cache Manager"></a> Configuring the Cache Manager
704
705 [[Configuring the Cache Manager|ConfiguringTheCacheManager]]
706
707 # <a name="Overview: Completing the Install"></a> Overview: Completing the Installation of the First AFS Machine
708
709 The machine is now configured as an AFS file server and client machine. In this final phase of the installation, you initialize the Cache Manager and then create the upper levels of your AFS filespace, among other procedures. The procedures are:
710
711 1. Verify that the initialization script works correctly, and incorporate it into the operating system's startup and shutdown sequence
712
713 1. Create and mount top-level volumes
714
715 1. Create and mount volumes to store system binaries in AFS
716
717 1. Enable access to foreign cells
718
719 1. Institute additional security measures
720
721 1. Remove client functionality if desired
722
723 ## <a name="Verifying the AFS Initialization"></a> Verifying the AFS Initialization Script
724
725 At this point you run the AFS initialization script to verify that it correctly invokes all of the necessary programs and AFS processes, and that they start correctly. The following are the relevant commands:
726
727 \* The command that dynamically loads AFS modifications into the kernel, on some system types (not applicable if the kernel has AFS modifications built in)
728
729 \* The bosserver command, which starts the BOS Server; it in turn starts the server processes for which you created entries in the /usr/afs/local/BosConfig file
730
731 \* The afsd command, which initializes the Cache Manager
732
733 On system types that use a dynamic loader program, you must reboot the machine before running the initialization script, so that it can freshly load AFS modifications into the kernel.
734
735 If there are problems during the initialization, attempt to resolve them. The AFS Product Support group can provide assistance if necessary.
736
737 1. Issue the bos shutdown command to shut down the AFS server processes other than the BOS Server. Include the -wait flag to delay return of the command shell prompt until all processes shut down completely.
738
739        # /usr/afs/bin/bos shutdown <machine name> -wait
740
741 1. Issue the ps command to learn the bosserver process's process ID number (PID), and then the kill command to stop it.
742
743        # ps appropriate_ps_options | grep bosserver
744
745        # kill bosserver_PID
746
747 1. Issue the appropriate commands to run the AFS initialization script for this system type.
748
749 ## <a name="On AIX systems:"></a> On AIX systems:
750
751 [[Initialization Script on AIX|InitializationScriptOnAIX]]
752
753 Proceed to Step 4.
754
755 ## <a name="On Digital UNIX systems:"></a> On Digital UNIX systems:
756
757 [[Initialization Script on Digital UNIX|InitializationScriptOnDigitalUNIX]]
758
759 Proceed to Step 4.
760
761 ## <a name="On HP-UX systems:"></a> On HP-UX systems:
762
763 [[Initialization Script on HP-UX|InitializationScriptOnHP-UX]]
764
765 Proceed to Step 4.
766
767 ## <a name="On IRIX systems:"></a> On IRIX systems:
768
769 [[Initialization Script on IRIX|InitializationScriptOnIRIX]]
770
771 Proceed to Step 4.
772
773 ## <a name="On Linux systems:"></a> On Linux systems:
774
775 [[Initialization Script on Linux|InitializationScriptOnLinux]]
776
777 Proceed to Step 4.
778
779 ## <a name="On Solaris systems:"></a> On Solaris systems:
780
781 [[Initialization Script on Solaris|InitializationScriptOnSolaris]]
782
783 Step 4. Verify that /usr/afs and its subdirectories on the new file server machine meet the ownership and mode bit requirements outlined in Protecting Sensitive AFS Directories. If necessary, use the chmod command to correct the mode bits.
784
785 Proceed to Configuring the Top Levels of the AFS Filespace.
786
787 # <a name="Configuring the Top Levels of th"></a> Configuring the Top Levels of the AFS Filespace
788
789 If you have not previously run AFS in your cell, you now configure the top levels of your cell's AFS filespace. If you have run a previous version of AFS, the filespace is already configured. Proceed to Storing AFS Binaries in AFS.
790
791 You created the root.afs volume in Starting the File Server, Volume Server, and Salvager, and the Cache Manager mounted it automatically on the local /afs directory when you ran the AFS initialization script in Verifying the AFS Initialization Script. You now set the access control list (ACL) on the /afs directory; creating, mounting, and setting the ACL are the three steps required when creating any volume.
792
793 After setting the ACL on the root.afs volume, you create your cell's root.cell volume, mount it as a subdirectory of the /afs directory, and set the ACL. Create both a read/write and a regular mount point for the root.cell volume. The read/write mount point enables you to access the read/write version of replicated volumes when necessary. Creating both mount points essentially creates separate read-only and read-write copies of your filespace, and enables the Cache Manager to traverse the filespace on a read-only path or read/write path as appropriate. For further discussion of these concepts, see the chapter in the IBM AFS Administration Guide about administering volumes.
794
795 Then replicate both the root.afs and root.cell volumes. This is required if you want to replicate any other volumes in your cell, because all volumes mounted above a replicated volume must themselves be replicated in order for the Cache Manager to access the replica.
796
797 When the root.afs volume is replicated, the Cache Manager is programmed to access its read-only version (root.afs.readonly) whenever possible. To make changes to the contents of the root.afs volume (when, for example, you mount another cell's root.cell volume at the second level in your filespace), you must mount the root.afs volume temporarily, make the changes, release the volume and remove the temporary mount point. For instructions, see Enabling Access to Foreign Cells.
798
799 1. Issue the fs setacl command to edit the ACL on the /afs directory. Add an entry that grants the l (lookup) and r (read) permissions to the system:anyuser group, to enable all AFS users who can reach your cell to traverse through the directory. If you prefer to enable access only to locally authenticated users, substitute the system:authuser group.
800
801 Note that there is already an ACL entry that grants all seven access rights to the system:administrators group. It is a default entry that AFS places on every new volume's root directory.
802
803        # /usr/afs/bin/fs setacl /afs system:anyuser rl
804
805 1. Issue the vos create command to create the root.cell volume. Then issue the fs mkmount command to mount it as a subdirectory of the /afs directory, where it serves as the root of your cell's local AFS filespace. Finally, issue the fs setacl command to create an ACL entry for the system:anyuser group (or system:authuser group).
806
807 For the partition name argument, substitute the name of one of the machine's AFS server partitions (such as /vicepa). For the cellname argument, substitute your cell's fully-qualified Internet domain name (such as abc.com).
808
809        # /usr/afs/bin/vos create  <machine name> <partition name> root.cell
810
811        # /usr/afs/bin/fs mkmount /afs/cellname  root.cell
812
813        # /usr/afs/bin/fs setacl /afs/cellname  system:anyuser rl
814
815 1. (Optional) Create a symbolic link to a shortened cell name, to reduce the length of pathnames for users in the local cell. For example, in the abc.com cell, /afs/abc is a link to /afs/abc.com.
816
817        # cd /afs
818
819        # ln -s  full_cellname  short_cellname
820
821 1. Issue the fs mkmount command to create a read/write mount point for the root.cell volume (you created a regular mount point in Step 2).
822
823 By convention, the name of a read/write mount point begins with a period, both to distinguish it from the regular mount point and to make it visible only when the -a flag is used on the ls command.
824
825 Change directory to /usr/afs/bin to make it easier to access the command binaries.
826
827        # cd /usr/afs/bin
828
829        # ./fs mkmount   /afs/.cellname   root.cell -rw
830
831 1. Issue the vos addsite command to define a replication site for both the root.afs and root.cell volumes. In each case, substitute for the partition name argument the partition where the volume's read/write version resides. When you install additional file server machines, it is a good idea to create replication sites on them as well.
832
833        # ./vos addsite <machine name> <partition name> root.afs
834
835        # ./vos addsite <machine name> <partition name> root.cell
836
837 1. Issue the fs examine command to verify that the Cache Manager can access both the root.afs and root.cell volumes, before you attempt to replicate them. The output lists each volume's name, volumeID number, quota, size, and the size of the partition that houses them. If you get an error message instead, do not continue before taking corrective action.
838
839        # ./fs examine /afs
840
841        # ./fs examine /afs/cellname
842
843 1. Issue the vos release command to release a replica of the root.afs and root.cell volumes to the sites you defined in Step 5.
844
845        # ./vos release root.afs
846
847        # ./vos release root.cell
848
849 1. Issue the fs checkvolumes to force the Cache Manager to notice that you have released read-only versions of the volumes, then issue the fs examine command again. This time its output mentions the read-only version of the volumes (root.afs.readonly and root.cell.readonly) instead of the read/write versions, because of the Cache Manager's bias to access the read-only version of the root.afs volume if it exists.
850
851        # ./fs checkvolumes
852
853        # ./fs examine /afs
854
855        # ./fs examine /afs/cellname
856
857 # <a name="Storing AFS Binaries in AFS"></a> Storing AFS Binaries in AFS
858
859 In the conventional configuration, you make AFS client binaries and configuration files available in the subdirectories of the /usr/afsws directory on client machines (afsws is an acronym for AFS workstation). You can conserve local disk space by creating /usr/afsws as a link to an AFS volume that houses the AFS client binaries and configuration files for this system type.
860
861 In this section you create the necessary volumes. The conventional location to which to link /usr/afsws is /afs/cellname/sysname/usr/afsws, where sysname is the appropriate system type name as specified in the IBM AFS Release Notes. The instructions in Installing Additional Client Machines assume that you have followed the instructions in this section.
862
863 If you have previously run AFS in the cell, the volumes possibly already exist. If so, you need to perform Step 8 only.
864
865 The current working directory is still /usr/afs/bin, which houses the fs and vos command suite binaries. In the following commands, it is possible you still need to specify the pathname to the commands, depending on how your PATH environment variable is set.
866
867 1. Issue the vos create command to create volumes for storing the AFS client binaries for this system type. The following example instruction creates volumes called sysname, sysname.usr, and sysname.usr.afsws. Refer to the IBM AFS Release Notes to learn the proper value of sysname for this system type.
868
869        # vos create <machine name> <partition name> sysname
870
871        # vos create <machine name> <partition name> sysname.usr
872
873        # vos create <machine name> <partition name> sysname.usr.afsws
874
875 1. Issue the fs mkmount command to mount the newly created volumes. Because the root.cell volume is replicated, you must precede the cellname part of the pathname with a period to specify the read/write mount point, as shown. Then issue the vos release command to release a new replica of the root.cell volume, and the fs checkvolumes command to force the local Cache Manager to access them.
876
877        # fs mkmount -dir /afs/.cellname/sysname -vol sysname
878
879        # fs mkmount -dir /afs/.cellname/sysname/usr  -vol sysname.usr
880
881        # fs mkmount -dir /afs/.cellname/sysname/usr/afsws -vol sysname.usr.afsws
882
883        # vos release root.cell
884
885        # fs checkvolumes
886
887 1. Issue the fs setacl command to grant the l (lookup) and r (read) permissions to the system:anyuser group on each new directory's ACL.
888
889        # cd /afs/.cellname/sysname
890
891        # fs setacl  -dir  .  usr  usr/afsws  -acl  system:anyuser rl
892
893 1. Issue the fs setquota command to set an unlimited quota on the volume mounted at the /afs/cellname/sysname/usr/afsws directory. This enables you to copy all of the appropriate files from the CD-ROM into the volume without exceeding the volume's quota.
894
895 If you wish, you can set the volume's quota to a finite value after you complete the copying operation. At that point, use the vos examine command to determine how much space the volume is occupying. Then issue the fs setquota command to set a quota that is slightly larger.
896
897        # fs setquota /afs/.cellname/sysname/usr/afsws  0
898
899 1. Mount the AFS CD-ROM for this machine's system type on the local /cdrom directory, if it is not already. For instructions on mounting CD-ROMs (either locally or remotely via NFS), consult the operating system documentation.
900
901 1. Copy the contents of the indicated directories from the CD-ROM into the /afs/cellname/sysname/usr/afsws directory.
902
903        # cd /afs/.cellname/sysname/usr/afsws
904
905        # cp -rp /cdrom/sysname/bin  .
906
907        # cp -rp /cdrom/sysname/etc  .
908
909        # cp -rp /cdrom/sysname/include  .
910
911        # cp -rp /cdrom/sysname/lib  .
912
913 1. Issue the fs setacl command to set the ACL on each directory appropriately. To comply with the terms of your AFS License agreement, you must prevent unauthorized users from accessing AFS software. To enable access for locally authenticated users only, set the ACL on the etc, include, and lib subdirectories to grant the l and r permissions to the system:authuser group rather than the system:anyuser group. The system:anyuser group must retain the l and r permissions on the bin subdirectory to enable unauthenticated users to access the klog binary. To ensure that unauthorized users are not accessing AFS software, check periodically that the ACLs on these directories are set properly.
914
915        # cd /afs/.cellname/sysname/usr/afsws
916
917        # fs setacl  -dir etc include lib  -acl  system:authuser rl  \
918                   system:anyuser none
919
920 1. Create /usr/afsws on the local disk as a symbolic link to the directory /afs/cellname/@sys/usr/afsws. You can specify the actual system name instead of @sys if you wish, but the advantage of using @sys is that it remains valid if you upgrade this machine to a different system type.
921
922        # ln -s /afs/cellname/@sys/usr/afsws  /usr/afsws
923
924 1. (Optional) To enable users to issue commands from the AFS suites (such as fs) without having to specify a pathname to their binaries, include the /usr/afsws/bin and /usr/afsws/etc directories in the PATH environment variable you define in each user's shell initialization file (such as .cshrc).
925
926 Storing AFS Documents in AFS
927
928 # <a name="The AFS distribution includes th"></a> The AFS distribution includes the following documents:
929
930 - IBM AFS Release Notes
931
932 - IBM AFS Quick Beginnings
933
934 - IBM AFS User Guide
935
936 - IBM AFS Administration Reference
937
938 - IBM AFS Administration Guide
939
940 The AFS CD-ROM for each system type has a top-level Documentation directory, with a subdirectory for each document format provided. The different formats are suitable for online viewing, printing, or both.
941
942 This section explains how to create and mount a volume to house the documents, making them available to your users. The recommended mount point for the volume is /afs/cellname/afsdoc. If you wish, you can create a link to the mount point on each client machine's local disk, called /usr/afsdoc. Alternatively, you can create a link to the mount point in each user's home directory. You can also choose to permit users to access only certain documents (most probably, the IBM AFS User Guide) by creating different mount points or setting different ACLs on different document directories.
943
944 The current working directory is still /usr/afs/bin, which houses the fs and vos command suite binaries you use to create and mount volumes. In the following commands, it is possible you still need to specify the pathname to the commands, depending on how your PATH environment variable is set.
945
946 1. Issue the vos create command to create a volume for storing the AFS documentation. Include the -maxquota argument to set an unlimited quota on the volume. This enables you to copy all of the appropriate files from the CD-ROM into the volume without exceeding the volume's quota.
947
948 If you wish, you can set the volume's quota to a finite value after you complete the copying operations. At that point, use the vos examine command to determine how much space the volume is occupying. Then issue the fs setquota command to set a quota that is slightly larger.
949
950        # vos create  <machine name> <partition name>  afsdoc  -maxquota  0
951
952 1. Issue the fs mkmount command to mount the new volume. Because the root.cell volume is replicated, you must precede the cellname with a period to specify the read/write mount point, as shown. Then issue the vos release command to release a new replica of the root.cell volume, and the fs checkvolumes command to force the local Cache Manager to access them.
953
954        # fs mkmount -dir /afs/.cellname/afsdoc -vol afsdoc
955
956        # vos release root.cell
957
958        # fs checkvolumes
959
960 1. Issue the fs setacl command to grant the rl permissions to the system:anyuser group on the new directory's ACL.
961
962        # cd /afs/.cellname/afsdoc
963
964        # fs setacl  .  system:anyuser rl
965
966 1. Mount the AFS CD-ROM for any system type on the local /cdrom directory, if one is not already. For instructions on mounting CD-ROMs (either locally or remotely via NFS), consult the operating system documentation.
967
968 1. Copy the AFS documents in one or more formats from the CD-ROM into subdirectories of the /afs/cellname/afsdoc directory. Repeat the commands for each format.
969
970        # mkdir format_name
971
972        # cd format_name
973
974        # cp -rp /cdrom/Documentation/format  .
975
976 If you choose to store the HTML version of the documents in AFS, note that in addition to a subdirectory for each document there are several files with a .gif extension, which enable readers to move easily between sections of a document. The file called index.htm is an introductory HTML page that contains a hyperlink to each of the documents. For online viewing to work properly, these files must remain in the top-level HTML directory (the one named, for example, /afs/cellname/afsdoc/html).
977
978 1. (Optional) If you believe it is helpful to your users to access the AFS documents in a certain format via a local disk directory, create /usr/afsdoc on the local disk as a symbolic link to the documentation directory in AFS (/afs/cellname/afsdoc/format\_name).
979
980        # ln -s /afs/cellname/afsdoc/format_name /usr/afsdoc
981
982 An alternative is to create a link in each user's home directory to the /afs/cellname/afsdoc/format\_name directory.
983
984 # <a name="Storing System Binaries in AFS"></a> Storing System Binaries in AFS
985
986 You can also choose to store other system binaries in AFS volumes, such as the standard UNIX programs conventionally located in local disk directories such as /etc, /bin, and /lib. Storing such binaries in an AFS volume not only frees local disk space, but makes it easier to update binaries on all client machines.
987
988 The following is a suggested scheme for storing system binaries in AFS. It does not include instructions, but you can use the instructions in Storing AFS Binaries in AFS (which are for AFS-specific binaries) as a template.
989
990 Some files must remain on the local disk for use when AFS is inaccessible (during bootup and file server or network outages). The required binaries include the following:
991
992 - A text editor, network commands, and so on
993
994 - Files used during the boot sequence before the afsd program runs, such as initialization and configuration files, and binaries for commands that mount file systems
995
996 - Files used by dynamic kernel loader programs
997
998 In most cases, it is more secure to enable only locally authenticated users to access system binaries, by granting the l (lookup) and r (read) permissions to the system:authuser group on the ACLs of directories that contain the binaries. If users need to access a binary while unauthenticated, however, the ACL on its directory must grant those permissions to the system:anyuser group.
999
1000 The following chart summarizes the suggested volume and mount point names for storing system binaries. It uses a separate volume for each directory. You already created a volume called sysname for this machine's system type when you followed the instructions in Storing AFS Binaries in AFS.
1001
1002 You can name volumes in any way you wish, and mount them at other locations than those suggested here. However, this scheme has several advantages:
1003
1004 - Volume names clearly identify volume contents
1005
1006 - Using the sysname prefix on every volume makes it is easy to back up all of the volumes together, because the AFS Backup System enables you to define sets of volumes based on a string included in all of their names
1007
1008 - It makes it easy to track related volumes, keeping them together on the same file server machine if desired
1009
1010 - There is a clear relationship between volume name and mount point name
1011
1012     Volume Name    Mount Point
1013     sysname    /afs/cellname/sysname
1014     sysname.bin    /afs/cellname/sysname/bin
1015     sysname.etc    /afs/cellname/sysname/etc
1016     sysname.usr    /afs/cellname/sysname/usr
1017     sysname.usr.afsws    /afs/cellname/sysname/usr/afsws
1018     sysname.usr.bin    /afs/cellname/sysname/usr/bin
1019     sysname.usr.etc    /afs/cellname/sysname/usr/etc
1020     sysname.usr.inc    /afs/cellname/sysname/usr/include
1021     sysname.usr.lib    /afs/cellname/sysname/usr/lib
1022     sysname.usr.loc    /afs/cellname/sysname/usr/local
1023     sysname.usr.man    /afs/cellname/sysname/usr/man
1024     sysname.usr.sys    /afs/cellname/sysname/usr/sys
1025
1026 # <a name="Enabling Access to Foreign Cells"></a> Enabling Access to Foreign Cells
1027
1028 In this section you create a mount point in your AFS filespace for the root.cell volume of each foreign cell that you want to enable your users to access. For users working on a client machine to access the cell, there must in addition be an entry for it in the client machine's local /usr/vice/etc/CellServDB file. (The instructions in Creating the Client [[CellServDB]] File suggest that you use the [[CellServDB]].sample file included in the AFS distribution as the basis for your cell's client [[CellServDB]] file. The sample file lists all of the cells that had agreed to participate in the AFS global namespace at the time your AFS CD-ROM was created. As mentioned in that section, the AFS Product Support group also maintains a copy of the file, updating it as necessary.)
1029
1030 The chapter in the IBM AFS Administration Guide about cell administration and configuration issues discusses the implications of participating in the global AFS namespace. The chapter about administering client machines explains how to maintain knowledge of foreign cells on client machines, and includes suggestions for maintaining a central version of the file in AFS.
1031
1032 1. Issue the fs mkmount command to mount each foreign cell's root.cell volume on a directory called /afs/foreign\_cell. Because the root.afs volume is replicated, you must create a temporary mount point for its read/write version in a directory to which you have write access (such as your cell's /afs/.cellname directory). Create the mount points, issue the vos release command to release new replicas to the read-only sites for the root.afs volume, and issue the fs checkvolumes command to force the local Cache Manager to access the new replica. <dl>
1033   <dt> Note</dt>
1034   <dd> You need to issue the fs mkmount command only once for each foreign cell's root.cell volume. You do not need to repeat the command on each client machine. </dd>
1035 </dl>
1036
1037 Substitute your cell's name for cellname.
1038
1039        # cd /afs/.cellname
1040
1041        # /usr/afs/bin/fs  mkmount  temp  root.afs
1042
1043 Repeat the fs mkmount command for each foreign cell you wish to mount at this time.
1044
1045        # /usr/afs/bin/fs mkmount temp/foreign_cell root.cell -c foreign_cell
1046
1047 Issue the following commands only once.
1048
1049        # /usr/afs/bin/fs rmmount temp
1050
1051        # /usr/afs/bin/vos release root.afs
1052
1053        # /usr/afs/bin/fs checkvolumes
1054
1055 1. If this machine is going to remain an AFS client after you complete the installation, verify that the local /usr/vice/etc/CellServDB file includes an entry for each foreign cell.
1056
1057 For each cell that does not already have an entry, complete the following instructions:
1058
1059 1. 1. 1. Create an entry in the [[CellServDB]] file. Be sure to comply with the formatting instructions in Creating the Client [[CellServDB]] File.
1060
1061 1. 1. 1. Issue the fs newcell command to add an entry for the cell directly to the list that the Cache Manager maintains in kernel memory. Provide each database server machine's fully qualified hostname.
1062
1063        # /usr/afs/bin/fs newcell <foreign_cell> <dbserver1>    \
1064                 [<dbserver2>] [<dbserver3>]
1065
1066 1. 1. 1. If you plan to maintain a central version of the [[CellServDB]] file (the conventional location is /afs/cellname/common/etc/CellServDB), create it now as a copy of the local /usr/vice/etc/CellServDB file. Verify that it includes an entry for each foreign cell you want your users to be able to access.
1067
1068        # mkdir common
1069
1070        # mkdir common/etc
1071
1072        # cp  /usr/vice/etc/CellServDB  common/etc
1073
1074        # /usr/afs/bin/vos release root.cell
1075
1076 1. Issue the ls command to verify that the new cell's mount point is visible in your filespace. The output lists the directories at the top level of the new cell's AFS filespace.
1077
1078        # ls /afs/foreign_cell
1079
1080 1. Please register your cell with the AFS Product Support group at this time. If you do not want to participate in the global AFS namespace, they list your cell in a private [[CellServDB]] file that is not available to other AFS cells.
1081
1082 # <a name="Improving Cell Security"></a> Improving Cell Security
1083
1084 This section discusses ways to improve the security of AFS data in your cell. Also see the chapter in the IBM AFS Administration Guide about configuration and administration issues.
1085
1086 # <a name="Controlling root Access"></a> Controlling root Access
1087
1088 As on any machine, it is important to prevent unauthorized users from logging onto an AFS server or client machine as the local superuser root. Take care to keep the root password secret.
1089
1090 The local root superuser does not have special access to AFS data through the Cache Manager (as members of the system:administrators group do), but it does have the following privileges:
1091
1092 - On client machines, the ability to issue commands from the fs suite that affect AFS performance
1093
1094 - On server machines, the ability to disable authorization checking, or to install rogue process binaries
1095
1096 ## <a name="Controlling System Administrator"></a> Controlling System Administrator Access
1097
1098 Following are suggestions for managing AFS administrative privilege:
1099
1100 - Create an administrative account for each administrator named something like username.admin. Administrators authenticate under these identities only when performing administrative tasks, and destroy the administrative tokens immediately after finishing the task (either by issuing the unlog command, or the klog command to adopt their regular identity).
1101
1102 - Set a short ticket lifetime for administrator accounts (for example, 20 minutes) by using the -lifetime argument to the kas setfields command, which is described in the IBM AFS Administration Reference. Do not however, use a short lifetime for users who issue long-running backup commands.
1103
1104 - Limit the number of system administrators in your cell, especially those who belong to the system:administrators group. By default they have all ACL rights on all directories in the local AFS filespace, and therefore must be trusted not to examine private files.
1105
1106 - Limit the use of system administrator accounts on machines in public areas. It is especially important not to leave such machines unattended without first destroying the administrative tokens.
1107
1108 - Limit the use by administrators of standard UNIX commands that make connections to remote machines (such as the telnet utility). Many of these programs send passwords across the network without encrypting them.
1109
1110 ## <a name="Protecting Sensitive AFS Directo"></a> Protecting Sensitive AFS Directories
1111
1112 Some subdirectories of the /usr/afs directory contain files crucial to cell security. Unauthorized users must not read or write to these files because of the potential for misuse of the information they contain.
1113
1114 As the BOS Server initializes for the first time on a server machine, it creates several files and directories (as mentioned in Starting the BOS Server). It sets their owner to the local superuser root and sets their mode bits to enable writing by the owner only; in some cases, it also restricts reading.
1115
1116 At each subsequent restart, the BOS Server checks that the owner and mode bits on these files are still set appropriately. If they are not, it write the following message to the /usr/afs/logs/BosLog file:
1117
1118        Bosserver reports inappropriate access on server directories
1119
1120 The BOS Server does not reset the mode bits, which enables you to set alternate values if you wish.
1121
1122 The following charts lists the expected mode bit settings. A question mark indicates that the BOS Server does not check that mode bit.
1123
1124     /usr/afs    drwxr?xr-x
1125     /usr/afs/backup    drwx???---
1126     /usr/afs/bin    drwxr?xr-x
1127     /usr/afs/db    drwx???---
1128     /usr/afs/etc    drwxr?xr-x
1129     /usr/afs/etc/KeyFile    -rw????---
1130     /usr/afs/etc/UserList    -rw?????--
1131     /usr/afs/local    drwx???---
1132     /usr/afs/logs    drwxr?xr-x
1133
1134 # <a name="Removing Client Functionality"></a> Removing Client Functionality
1135
1136 Follow the instructions in this section only if you do not wish this machine to remain an AFS client. Removing client functionality means that you cannot use this machine to access AFS files.
1137
1138 1. Remove the files from the /usr/vice/etc directory. The command does not remove the directory for files used by the dynamic kernel loader program, if it exists on this system type. Those files are still needed on a server-only machine.
1139
1140        # cd /usr/vice/etc
1141
1142        # rm  *
1143
1144        # rm -rf  C
1145
1146 1. Create symbolic links to the [[ThisCell]] and [[CellServDB]] files in the /usr/afs/etc directory. This makes it possible to issue commands from the AFS command suites (such as bos and fs) on this machine.
1147
1148        # ln -s /usr/afs/etc/ThisCell ThisCell
1149
1150        # ln -s /usr/afs/etc/CellServDB CellServDB
1151
1152 1. On IRIX systems, issue the chkconfig command to deactivate the afsclient configuration variable.
1153
1154        # /etc/chkconfig -f afsclient off
1155
1156 1. Reboot the machine. Most system types use the shutdown command, but the appropriate options vary.
1157
1158        # cd /
1159
1160        # shutdown appropriate_options