fsbnode-rename-unused-to-dummy-20090604
[openafs.git] / doc / html / QuickStartUnix / auqbg008.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
2 <HTML><HEAD>
3 <TITLE>Quick Beginnings</TITLE>
4 <!-- Begin Header Records  ========================================== -->
5 <!-- /tmp/idwt3574/auqbg000.scr converted by idb2h R4.2 (359) ID      -->
6 <!-- Workbench Version (AIX) on 2 Oct 2000 at 12:25:35                -->
7 <META HTTP-EQUIV="updated" CONTENT="Mon, 02 Oct 2000 12:25:35">
8 <META HTTP-EQUIV="review" CONTENT="Tue, 02 Oct 2001 12:25:35">
9 <META HTTP-EQUIV="expires" CONTENT="Wed, 02 Oct 2002 12:25:35">
10 </HEAD><BODY>
11 <!-- (C) IBM Corporation 2000. All Rights Reserved    --> 
12 <BODY bgcolor="ffffff"> 
13 <!-- End Header Records  ============================================ -->
14 <A NAME="Top_Of_Page"></A>
15 <H1>Quick Beginnings</H1>
16 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auqbg002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auqbg007.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auqbg009.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auqbg009.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
17 <P>
18 <HR><H1><A NAME="HDRWQ163" HREF="auqbg002.htm#ToC_153">Appendix A. Building AFS from Source Code</A></H1>
19 <P>This chapter describes how to build AFS from source
20 code.
21 <A NAME="IDX3090"></A>
22 <A NAME="IDX3091"></A>
23 <A NAME="IDX3092"></A>
24 <A NAME="IDX3093"></A>
25 <A NAME="IDX3094"></A>
26 <HR><H2><A NAME="HDRWQ164" HREF="auqbg002.htm#ToC_154">Loading the Source Files</A></H2>
27 <P>Working on an AFS client machine, perform these steps to
28 load the AFS source tree from the AFS Source Distribution.
29 <OL TYPE=1>
30 <A NAME="IDX3095"></A>
31 <A NAME="IDX3096"></A>
32 <A NAME="IDX3097"></A>
33 <A NAME="IDX3098"></A>
34 <A NAME="IDX3099"></A>
35 <P><LI>Create and mount a volume for housing the AFS source tree. These
36 instructions name the volume <B>src.afs</B> and mount it at the
37 <B>/afs/</B><VAR>cellname</VAR><B>/afs/src</B> directory. 
38 <P>Setting the <B>-maxquota</B> argument to <B>0</B> (zero) sets an
39 unlimited quota on the volume, which enables you to copy all of the files into
40 the volume without exceeding its quota. If you wish, you can set the
41 volume's quota to a finite value after you complete the copying
42 operation. At that point, use the <B>vos examine</B> command to
43 determine how much space the volume is occupying. Then issue the
44 <B>fs setquota</B> command to set a quota that is slightly larger. 
45 <PRE>   
46    # <B>vos create</B> &lt;<VAR>machine&nbsp;name</VAR>> &lt;<VAR>partition&nbsp;name</VAR>> <B>src.afs -maxquota 0</B> 
47    
48    # <B>cd /afs/.</B><VAR>cellname</VAR>
49    
50    # <B>mkdir afs</B>
51    
52    # <B>fs mkmount afs/src src.afs</B>
53    
54    # <B>vos release root.cell</B>
55    
56    # <B>fs checkvolumes</B>
57    
58 </PRE>
59 <P><LI>On the local <B>/cdrom</B> directory, mount the CD-ROM that contains
60 the AFS source files. For instructions on mounting CD-ROMs (either
61 locally or remotely via NFS), consult the operating system
62 documentation.
63 <A NAME="IDX3100"></A>
64 <A NAME="IDX3101"></A>
65 <P><LI>Copy the source files from the CD-ROM into the newly created
66 volume. 
67 <PRE>   
68    # <B>cd /cdrom/src</B>
69    
70    # <B>cp -rp  *  /afs/.</B><VAR>cellname</VAR>/<B>afs/src</B>
71    
72 </PRE>
73 </OL>
74 <A NAME="IDX3102"></A>
75 <A NAME="IDX3103"></A>
76 <A NAME="IDX3104"></A>
77 <HR><H2><A NAME="HDRWQ165" HREF="auqbg002.htm#ToC_155">Compiling AFS Binaries Using the washtool Program</A></H2>
78 <P>The AFS distribution includes the <B>washtool</B>
79 program for managing a hierarchy of software development projects. The
80 program builds project trees for program editing, compilation, and
81 installation.
82 <OL TYPE=1>
83 <P><LI>Create a subdirectory under the
84 <B>/afs/.</B><VAR>cellname</VAR><B>/afs</B> directory for each
85 system type for which you will build AFS binaries. Creating and
86 mounting a volume for each system type is recommended, but you can also simply
87 use the <B>mkdir</B> command. If you create a new volume, grant it
88 an unlimited quota to avoid running out of space during the build
89 process. 
90 <PRE>   
91    # <B>cd /afs/.</B><VAR>cellname</VAR><B>/afs</B>    
92 </PRE> 
93 <P>If creating a new volume:
94 <PRE>   
95    # <B>vos create</B> &lt;<VAR>machine&nbsp;name</VAR>> &lt;<VAR>partition&nbsp;name</VAR>> <VAR>sysname</VAR> <B>-maxquota 0</B>
96    
97    # <B>fs mkmount</B> <VAR>sysname</VAR> <VAR>sysname</VAR>    
98 </PRE> 
99 <P>If not creating a new volume:
100 <PRE>    
101    # <B>mkdir</B> <VAR>sysname</VAR>
102    
103 </PRE>
104 <P><LI>In the directory for each system type, create subdirectories called
105 <B>dest</B>, <B>dest/bin</B>, and <B>obj</B>. If you plan
106 to use the <I>@sys</I> variable in pathnames that refer to these
107 directories, then you must use the conventional system names listed in the
108 <I>IBM AFS Release Notes</I>.
109 <PRE>   
110    # <B>cd</B> <VAR>sysname</VAR>
111    
112    # <B>mkdir dest</B> 
113    
114    # <B>mkdir dest/bin</B> 
115    
116    # <B>mkdir obj</B>
117    
118 </PRE>
119 <P><LI>Create the indicated directories and symbolic links in the
120 <B>/afs/.</B><VAR>cellname</VAR><B>/afs</B> directory.
121 <PRE>   
122    # <B>cd /afs/.</B><VAR>cellname</VAR><B>/afs</B>
123    
124    # <B>ln -s  @sys/dest  dest</B>
125    
126    # <B>ln -s  @sys/obj  obj</B>
127    
128    # <B>ln -s  .  PARENT</B>
129    
130    # <B>ln -s  src/Makefile  Makefile</B>   
131 </PRE> 
132 <P>The following is an example directory listing for the
133 <B>/afs/.</B><VAR>cellname</VAR><B>/afs</B> directory after
134 completing the preceding steps. It includes two example system
135 types. 
136 <PRE>   
137    lrwxr-xr-x admin   12 Jun 18 11:26 Makefile->src/Makefile
138    lrwxr-xr-x admin    1 Jun 18 11:26 PARENT -> .
139    lrwxr-xr-x admin    9 Jun 18 11:25 dest -> @sys/dest
140    lrwxr-xr-x admin    8 Jun 18 11:25 obj -> @sys/obj
141    drwxrwxrwx admin 4096 Jun 18 11:24 rcs
142    drwxrwxrwx admin 2048 Jun 18 11:27 rs_aix42
143    drwxrwxrwx admin 2048 Jun 18 11:10 src
144    drwxrwxrwx admin 2048 Jun 18 11:27 sun4x_56
145    
146 </PRE>
147 <P><LI><B>(Optional)</B> By default, the build procedure writes its results
148 into a destination directory for each system type called
149 <B>/afs/.</B><VAR>cellname</VAR><B>/afs/</B><VAR>sysname</VAR><B>/dest</B>.
150 To write the results to a different destination directory, create a link from
151 the <B>dest</B> directory to it. 
152 <PRE>   
153    # <B>cd /afs/.</B><VAR>cellname</VAR><B>/afs/</B><VAR>sysname</VAR>
154    
155    # <B>ln -s</B> <VAR>full_path_of_alternate_directory</VAR> <B>dest</B>
156    
157 </PRE>
158 <A NAME="IDX3105"></A>
159 <A NAME="IDX3106"></A>
160 <P><LI>For each system type you plan to build, copy the binary for the
161 <B>washtool</B> program to the directory specified in the AFS
162 <B>Makefile</B>, which is
163 <B>/afs/</B><VAR>cellname</VAR><B>/afs/</B><VAR>sysname</VAR><B>/dest/bin</B>.
164 If you prefer to store the program in a different directory, you can use the
165 WASHTOOL variable on the <B>make</B> command line as described in Step <A HREF="#LIWQ166">6</A>.
166 <P>If there is a volume that houses the AFS binaries for each system type (as
167 recommended), the conventional location for the <B>washtool</B> binary is
168 the
169 <B>/afs/</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR><B>/usr/afsws/bin</B>
170 directory. Use the following instruction to copy it.
171 <PRE>   
172    # <B>cd  /afs/</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR><B>/usr/afsws/bin</B>
173    
174    # <B>cp  washtool</B>  <B>/afs/.</B><VAR>cellname</VAR><B>/afs/</B><VAR>sysname</VAR><B>/dest/bin</B>   
175 </PRE> 
176 <P>Otherwise, mount the (binary) AFS CD-ROM for this system type on the local
177 <B>/cdrom</B> directory, and copy the <B>washtool</B> binary directly
178 from it.
179 <PRE>   
180    # <B>cd  /cdrom/</B><VAR>sysname</VAR><B>/bin</B>
181    
182    # <B>cp  washtool</B>  <B>/afs/.</B><VAR>cellname</VAR><B>/afs/</B><VAR>sysname</VAR><B>/dest/bin</B>
183    
184 </PRE>
185 <A NAME="IDX3107"></A>
186 <A NAME="IDX3108"></A>
187 <A NAME="IDX3109"></A>
188 <A NAME="IDX3110"></A>
189 <A NAME="IDX3111"></A>
190 <A NAME="IDX3112"></A>
191 <P><LI><A NAME="LIWQ166"></A>Working in the
192 <B>/afs/.</B><VAR>cellname</VAR><B>/afs</B> directory on a
193 machine of the system type for which you are building AFS, issue the <B>make
194 install</B> command. Set the SYS_NAME variable to the appropriate
195 system type name. 
196 <P>If the <B>washtool</B> binary is not in the conventional directory
197 (<B>/afs/</B><VAR>cellname</VAR><B>/afs/</B><VAR>sysname</VAR><B>/dest/bin</B>),
198 set the WASHTOOL variable to the alternate full pathname of the binary.
199 <PRE>  
200    # <B>cd /afs/.</B><VAR>cellname</VAR><B>/afs</B>
201   
202    # <B>make SYS_NAME=</B><VAR>sysname</VAR> [<B>WASHTOOL=</B><VAR>alternate_washtool_directory</VAR>] <B>install</B>
203    
204 </PRE>
205 </OL>
206 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auqbg002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auqbg007.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auqbg009.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auqbg009.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
207 <!-- Begin Footer Records  ========================================== -->
208 <P><HR><B> 
209 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
210 </B> 
211 <!-- End Footer Records  ============================================ -->
212 <A NAME="Bot_Of_Page"></A>
213 </BODY></HTML>