none
[openafs-wiki.git] / AFSLore / HowToBuildOpenAFSFromSource.mdwn
index c33b0a9..386081d 100644 (file)
@@ -2,52 +2,78 @@ This is a guide on how to build [[OpenAFS]] from source code. Note that [[OpenAF
 
 ### <a name="Requirements"></a> Requirements
 
+Tools
+
+- cvs client
 - autoconf
 - automake
 - perl 5.6
+- gcc (versions?)
+- GNU make
+- lex/yacc (flex/bison)
 
-One of the following compiliers:
+Libraries
 
-- gcc (versions?)
+- libc
+- kerberos, optional, but recommended
+- ncurses
+- kernel headers
+
+The Kerberos development libraries are required if you are going to build with Kerberos 5 support. The [[OpenAFS]] legacy kaserver is deprecated.
+
+If you are building on Debian, you can get the required software with the following apt-get commands.
+
+      apt-get install cvs autoconf automake make gcc flex bison
+      apt-get install libc6-dev libkrb5-dev libncurses5-dev linux-headers-$(uname -r)
 
 ### <a name="Getting the Source Code from CVS"></a> Getting the Source Code from CVS
 
-You can get development snapshots from the [[OpenAFS]] CVS repository. The CVS tree may not always have code which can currently be built. While every effort is made to keep the head of the tree buildable, you may at any time find yourself between commits and hence have a tree which does not build, or worse, causes more serious problems.
+You can get development snapshots from the [[OpenAFS]] CVS repository . The CVS tree may not always have code which can currently be built. While every effort is made to keep the head of the tree buildable, you may at any time find yourself between commits and hence have a tree which does not build, or worse, causes more serious problems.
 
 First you need to run cvs login. This step is normally only done once. A ~/.cvspass file will be created for additional checkouts.
 
        cvs -d :pserver:anonymous@cvs.openafs.org:/cvs  login
        password is anonymous
 
-To check out the 1.4 branch:
+Before doing a CVS check out, you'll need to decide which branch you want to check out. The trunk is for bleeding edge development and may not even build. The current stable series is openafs-stable-1\_4\_x and the current development work is going on the openafs-devel-1\_5\_x branch.
 
-       cvs -d :pserver:anonymous@cvs.openafs.org:/cvs co -r openafs-stable-1_4_x openafs
+See the CVSWeb interface at <http://www.openafs.org/frameset/cgi-bin/cvsweb.cgi/openafs/> for the full list of available branches and tags.
 
-To check out the 1.5 development branch:
+To check out the stable branch:
 
-       cvs -d :pserver:anonymous@cvs.openafs.org:/cvs co -r openafs-devel-1_5_x openafs
+       cvs -d :pserver:anonymous@cvs.openafs.org:/cvs checkout -r openafs-stable-1_4_x openafs
 
-See the CVSWeb interface at <http://www.openafs.org/frameset/cgi-bin/cvsweb.cgi/openafs/> to see a full list of available branches and tags
+To check out the development branch:
 
-CVS snapshots do not include files generated by autoconf; You can run regen.sh at the top level to create these files. You will need to have autoconf and automake installed on your system.
+       cvs -d :pserver:anonymous@cvs.openafs.org:/cvs checkout -r openafs-devel-1_5_x openafs
 
-### <a name="Building the Binaries"></a> Building the Binaries
-
-#### <a name="Quick Answer"></a> Quick Answer
+This will create a source tree in a directory named openafs.
 
-To build [[OpenAFS]] with Kerberos 5 support and the traditional paths:
+Run the regen.sh script to create the configure script.
 
        cd openafs
        ./regen.sh
-       ./configure  --enable-debug --enable-transarc-paths --with-krb5-conf=(full path to krb5-config script)
+
+### <a name="Building the Binaries"></a> Building the Binaries
+
+#### <a name="Transarc Paths"></a> Transarc Paths
+
+By convention, [[OpenAFS]] server binaries and related files are located in /usr/afs, and client binaries and related files are located in /usr/vice. These are known as Transarc paths, so called because that is is the convention used by Transarc, the company that first commercialized AFS. To build with the Transarc paths, specify --enable-transarc-paths as a configure option.
+
+To build with Keberos support (recommended), you'll need to have the Keberos development libraries, and if available for your platform, the krb5-config. You will need the full path the the krb5-config script. For example
+
+       which krb5-config
+       /user/bin/krb5-config
+
+To build [[OpenAFS]] with Kerberos 5 support and the Transarc path conventions:
+
+       ./configure  --enable-transarc-paths --with-krb5-conf=/usr/bin/krb5-config
        make
        make dest
 
-You will need the Kerberos development libraries to build Kerbose support.
+If all goes well, then the binaries are located in a platform sub-directory, the name of which is platform specific, for example 'i386\_linux26/dest'.
 
-### <a name="Installing the Binaries"></a> Installing the Binaries
-
-After make dest, the binaries are placed into a dest directory, under a platform directory, such as i386\_linux26.
+The 'make install' command does not work with Transarc paths. You will have to manually copy the binaries into place after running make dest. For more information, see the Quick Start Guide for Unix on the [[OpenAFS]] documentation page.
 
       # cp -r i386_linux26/dest/root.client/usr/vice/etc/modload /usr/vice/etc
       # cp i386_linux26/dest/root.client/usr/vice/etc/afsd /usr/vice/etc
@@ -57,6 +83,14 @@ After make dest, the binaries are placed into a dest directory, under a platform
       # cp -r i386_linux26/dest/lib /usr/afsws
       # cp -r i386_linux26/dest/root.server/usr/afs/* /usr/afs
 
+#### <a name="Custom Paths"></a> Custom Paths
+
+To build [[OpenAFS]] with Kerberos 5 support, and with a custom install path,
+
+       ./configure --prefix=/usr/local/openafs --with-krb5-conf=(full path to krb5-config script)
+       make
+       sudo make install
+
 ### <a name="Initial testing"></a> Initial testing
 
 -- [[MichaelMeffie]] - 09 Oct 2007