1 This is a guide on how to build [[OpenAFS]] from source code. Note that [[OpenAFS]] pre-built binaries are available on the [[OpenAFS]] site and are available as prebuilt packages for many platforms. These instructions may be useful for you if you need to build [[OpenAFS]] from source.
3 ### <a name="Requirements"></a> Requirements
13 - lex/yacc (flex/bison)
18 - kerberos, optional, but recommended
22 The Kerberos development libraries are required if you are going to build with Kerberos 5 support. The [[OpenAFS]] legacy kaserver is deprecated.
24 If you are building on Debian, you can get the required software with the following apt-get commands.
26 apt-get install cvs autoconf automake make gcc flex bison
27 apt-get install libc6-dev libkrb5-dev libncurses5-dev linux-headers-$(uname -r)
29 ### <a name="Getting the Source Code from CVS"></a> Getting the Source Code from CVS
31 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.
33 First you need to run cvs login. This step is normally only done once. A ~/.cvspass file will be created for additional checkouts.
35 cvs -d :pserver:anonymous@cvs.openafs.org:/cvs login
38 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.
40 See the CVSWeb interface at <http://www.openafs.org/frameset/cgi-bin/cvsweb.cgi/openafs/> for the full list of available branches and tags.
42 To check out the stable branch:
44 cvs -d :pserver:anonymous@cvs.openafs.org:/cvs checkout -r openafs-stable-1_4_x openafs
46 To check out the development branch:
48 cvs -d :pserver:anonymous@cvs.openafs.org:/cvs checkout -r openafs-devel-1_5_x openafs
50 This will create a source tree in a directory named openafs.
52 Run the regen.sh script to create the configure script.
57 ### <a name="Building the Binaries"></a> Building the Binaries
59 #### <a name="Transarc Paths"></a> Transarc Paths
61 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.
63 To build [[OpenAFS]] with Kerberos 5 support and the traditional, Transarc paths:
65 ./configure --enable-transarc-paths --with-krb5-conf=(full path to krb5-config script)
69 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'.
71 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.
73 # cp -r i386_linux26/dest/root.client/usr/vice/etc/modload /usr/vice/etc
74 # cp i386_linux26/dest/root.client/usr/vice/etc/afsd /usr/vice/etc
75 # cp -r i386_linux26/dest/bin /usr/afsws
76 # cp -r i386_linux26/dest/etc /usr/afsws
77 # cp -r i386_linux26/dest/include /usr/afsws
78 # cp -r i386_linux26/dest/lib /usr/afsws
79 # cp -r i386_linux26/dest/root.server/usr/afs/* /usr/afs
81 #### <a name="Custom Paths"></a> Custom Paths
83 To build [[OpenAFS]] with Kerberos 5 support, and with a custom install path,
85 ./configure --prefix=/usr/local/openafs --with-krb5-conf=(full path to krb5-config script)
89 ### <a name="Initial testing"></a> Initial testing
91 -- [[MichaelMeffie]] - 09 Oct 2007