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 To check out the 1.4 branch:
40 cvs -d :pserver:anonymous@cvs.openafs.org:/cvs co -r openafs-stable-1_4_x openafs
42 To check out the 1.5 development branch:
44 cvs -d :pserver:anonymous@cvs.openafs.org:/cvs co -r openafs-devel-1_5_x openafs
46 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
48 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.
50 ### <a name="Building the Binaries"></a> Building the Binaries
52 #### <a name="Transarc Paths"></a> Transarc Paths
54 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 commercized AFS.
56 To build [[OpenAFS]] with Kerberos 5 support and the traditional, Transarc paths:
60 ./configure --enable-transarc-paths --with-krb5-conf=(full path to krb5-config script)
64 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'.
66 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.
68 # cp -r i386_linux26/dest/root.client/usr/vice/etc/modload /usr/vice/etc
69 # cp i386_linux26/dest/root.client/usr/vice/etc/afsd /usr/vice/etc
70 # cp -r i386_linux26/dest/bin /usr/afsws
71 # cp -r i386_linux26/dest/etc /usr/afsws
72 # cp -r i386_linux26/dest/include /usr/afsws
73 # cp -r i386_linux26/dest/lib /usr/afsws
74 # cp -r i386_linux26/dest/root.server/usr/afs/* /usr/afs
76 #### <a name="Custom Paths"></a> Custom Paths
78 To build [[OpenAFS]] with Kerberos 5 support, and with a custom install path,
82 ./configure --prefix=/usr/local/openafs --with-krb5-conf=(full path to krb5-config script)
86 ### <a name="Initial testing"></a> Initial testing
88 -- [[MichaelMeffie]] - 09 Oct 2007