c33b0a9d42ff9418843792171fb40eaf61dd63c5
[openafs-wiki.git] / AFSLore / HowToBuildOpenAFSFromSource.mdwn
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.
2
3 ### <a name="Requirements"></a> Requirements
4
5 - autoconf
6 - automake
7 - perl 5.6
8
9 One of the following compiliers:
10
11 - gcc (versions?)
12
13 ### <a name="Getting the Source Code from CVS"></a> Getting the Source Code from CVS
14
15 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.
16
17 First you need to run cvs login. This step is normally only done once. A ~/.cvspass file will be created for additional checkouts.
18
19        cvs -d :pserver:anonymous@cvs.openafs.org:/cvs  login
20        password is anonymous
21
22 To check out the 1.4 branch:
23
24        cvs -d :pserver:anonymous@cvs.openafs.org:/cvs co -r openafs-stable-1_4_x openafs
25
26 To check out the 1.5 development branch:
27
28        cvs -d :pserver:anonymous@cvs.openafs.org:/cvs co -r openafs-devel-1_5_x openafs
29
30 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
31
32 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.
33
34 ### <a name="Building the Binaries"></a> Building the Binaries
35
36 #### <a name="Quick Answer"></a> Quick Answer
37
38 To build [[OpenAFS]] with Kerberos 5 support and the traditional paths:
39
40        cd openafs
41        ./regen.sh
42        ./configure  --enable-debug --enable-transarc-paths --with-krb5-conf=(full path to krb5-config script)
43        make
44        make dest
45
46 You will need the Kerberos development libraries to build Kerbose support.
47
48 ### <a name="Installing the Binaries"></a> Installing the Binaries
49
50 After make dest, the binaries are placed into a dest directory, under a platform directory, such as i386\_linux26.
51
52       # cp -r i386_linux26/dest/root.client/usr/vice/etc/modload /usr/vice/etc
53       # cp i386_linux26/dest/root.client/usr/vice/etc/afsd /usr/vice/etc
54       # cp -r i386_linux26/dest/bin /usr/afsws
55       # cp -r i386_linux26/dest/etc /usr/afsws
56       # cp -r i386_linux26/dest/include /usr/afsws
57       # cp -r i386_linux26/dest/lib /usr/afsws
58       # cp -r i386_linux26/dest/root.server/usr/afs/* /usr/afs
59
60 ### <a name="Initial testing"></a> Initial testing
61
62 -- [[MichaelMeffie]] - 09 Oct 2007