1 Id: INSTALL,v 1.93 2002/09/07 10:41:43 lha Exp $ ($Name$)
5 Arla is configured with autoconf. Start the configuration process by
8 - `./configure' in the source directory, or
9 - `SRCDIR/configure' in the directory where you want to build arla.
10 (we recommend you to build somewhere else like in /var/tmp/arlaobj
11 because that way it is easier to start over. That requires a
12 make command that understands VPATH, for example gnu make)
14 If you want to install somewhere different from the default
15 `/usr/arla' give `--prefix=PATH' as an argument to configure. Note
16 that if you change your prefix from the default your kerberos
17 libraries may have problems that your kerberos/afs libraries are
18 unable to find what cell you belong to.
20 Note that the kernel module is fairly specific to a particular version
21 of the OS kernel, so you should make sure that you have built Arla for
22 the same version that are you are running on.
24 There are also some arla-specific arguments to configure (see
25 configure --help for full list):
28 --enable-smp compile for SMP (for Linux and FreeBSD)
29 --enable-kld build kld modules (only FreeBSD 3.0)
30 --disable-nnpfs build arla w/o nnpfs
31 --enable-knfs make afs nfs-mountable
32 --disable-mmap don't use mmap
33 --disable-dynamic-afs don't use loaded AFS library with AIX
36 --with-x use the X Window System
37 --with-pthreads=dir compile liblwp as pthreads wrapper using pthreads in dir
38 --with-sys=dir use dir as your kernel source code directory
40 --without-lwp-redzone don't use redzone for (asm)lwp
41 --with-arlacachedir=dir use dir as cachedir instead of \$prefix/cache
42 --with-arlaconffile=file use file for configuration instead of \$prefix/etc/arla.conf
43 --with-milkopart=dir location of milko partitions (default /)
44 --with-readline=dir use readline in dir
45 --with-readline-lib=dir use readline libraries in dir
46 --with-readline-include=dir
47 use readline headers in dir
48 --with-readline-config=path
49 config program for readline
50 --with-sl=dir make with sl in dir
51 --with-sl-include=dir make with sl headers in dir
52 --with-sl-lib=dir make with sl lib in dir
53 --with-roken=dir make with roken in dir
54 --with-roken-include=dir make with roken headers in dir
55 --with-roken-lib=dir make with roken lib in dir
56 --without-ipv6 do not enable IPv6 support
57 --with-krb5=dir use kerberos 5 in dir
58 --with-krb5-include=dir use kerberos 5 headers in dir
59 --with-krb5-lib=dir use kerberos 5 libraries in dir
60 --with-krbafs=dir use libkrbafs (from mit, extracted from kth-krb) in dir
62 By default configure will use gcc if it finds it. If you want to use
63 a specific compiler or some special options you can specify that when
66 If you change CFLAGS you might also have to set KERNEL_CFLAGS. The
67 reason for having different variables is that lots of times totally
68 different compilation environment are required (64-bit and 32-bit on
69 linux/sparcv9 and MacOS for example).
73 env CC=my-compiler CFLAGS='magic-flags' ./configure
75 If there's no kernel support for your operating system, configure will
76 print a warning to that effect and only the user-level stuff will be
79 Solaris 2.7, 2.8 (or Solaris 7, 8):
81 On Solaris 2.7, 2.8 the kernel itself can be either 32 bit or 64 bit.
82 The nnpfs kernel module needs to be of the same type as the kernel. You
83 can find out what type of kernel you have from `dmesg'. It should say
88 SunOS Release 5.7 Version Generic [UNIX(R) System V Release 4.0]
90 that means it's a 32 bit kernel, but if it says:
92 SunOS Release 5.7 Version Generic 64-bit [UNIX(R) System V Release 4.0]
96 To build a 32 bit arla you don't need to do anything special. If you
97 however want a 64 bit one the magic incarnation of configure is:
99 env CC='cc -xarch=v9' AS='as -xarch=v9' configure sparc64-sun-solaris2.7
101 Once configure has completed, just run `make'.
103 Solaris does not have an memcpy function in the kernel and gcc can
104 sometimes generate calls to this function. If you get unresolved
105 symbol errors on memcpy, either compile with Sun's compiler or define
106 memcpy in terms of bcopy.
110 The platforms we have tested are Mac OS X 10.2. You must install the
111 Developer Tools CD before you can compile Arla.
113 There is documentation to configure the native kerberos in Mac OS X provided by MIT here: <http://web.mit.edu/macdev/Development/MITKerberos/Common/Documentation/preferences.html>
115 If you choose to use the native Kerberos stuff you'll need krbafs, see
116 the README where to find it.
120 RedHat ships in the 7.0 release a gcc that can't compile the linux
121 kernel. To remedy this problem they also ship a kgcc that should be
122 used to compile the linux kernel and kernel modules. When running
123 configure on such a computer, please set KERNEL_CC to kgcc. Example:
125 env KERNEL_CC=kgcc ./configure --argument-to-configure-if-any
127 If you are running a kernel that isn't the kernel symlinked/unpacked
128 to/in /usr/src/linux you will need to use --with-sys=dir
129 option (see <http://www.pathname.com/fhs/2.0/fhs-6.1.6.html>).
130 Without it will not work, either you will get error when doing
131 insmod or strange error when accessing files in /afs.
133 You need to have run make config (or make xconfig or make menuconfig)
134 and make dep before you run arla's configure. This since
135 header files (like linux/version.h) need to have right datestamp to
138 Issues with the Linux 2.6.x kernel versions
140 To build nnpfs, the arla build process needs to make some symlinks in
141 the kernel source directories. Because of this, you must have a fully
142 configured kernel source tree and it must be writable in some places.
143 This is due to changes how the 2.6 kernel series are built.
145 Issues with some Linux glibc versions
147 Some Linux distributions ship with a glibc that uses pthreads in a way
148 which makes arlad break (as in segmentation fault at strange places)
149 because of conflicts with arlas lwp. If you encounter this try some
150 of these alternatives: Compile arlad with another glibc version (for
151 exemple on another distribution) or try the --with-ptherads configure
156 You will need the kernel source installed in /usr/src/sys.
160 NetBSD 1.5 include kth-krb and heimdal and due to that arla and
161 kth-krb uses a common library (libroken) there might be some
162 collisions you should run configure like this:
166 --with-roken-include=/usr/include/krb5 \
167 --with-roken-lib=/usr/lib
169 Tru64 Unix (aka Digital Unix (aka OSF/1)):
171 We recommend building with Digital's cc, since that's what the rest of
172 the kernel is built with. We suggest using env CC='cc -std1' configure.
176 Run `make install'. It will create and populate these directories:
178 /usr/arla/bin all user binaries
179 /usr/arla/sbin arla-cli and the startarla script
180 /usr/arla/libexec the arlad
181 /usr/arla/cache the cached files will be stored here
182 (core-dumps from arlad as well)
183 /usr/arla/etc configuration files:
184 ThisCell, CellServDB, arla.conf
185 /usr/arla/lib random libraries
187 If you're already part of an AFS cell, modify /usr/arla/etc/ThisCell
188 and make sure your cell is mentioned in /usr/arla/etc/CellServDB. If
189 you don't have a cell you'll still be able to run as a client in the
190 cell `stacken.kth.se' and access all cells listed in CellServDB.
194 Everything works fine even if your /etc/services is not updated, but
195 you might not get netstat, tcpdump, and other programs might not print
196 the symbolic names. To make all of this work, add the
197 contents of SRCDIR/conf/services to /etc/services.
199 cat SRCDIR/conf/services >> /etc/services
203 To start Arla just run `/usr/arla/sbin/startarla'. (On Linux there is
204 also a rc.d-based script, see below).
206 Here are some detailed quirks for some operating systems and
207 instructions as to what to try when startarla does not give you
208 full and complete satisfaction.
212 Linux gives you a wide choice of filesystems to place the cache
213 partition on. We have verified that ext2 and ext3 work to be
214 used as /usr/arla/cache. We have experienced problems with
215 reiserfs. These might or might not be fixed today. You have
216 been warned. As the arla cache is rebuild on boot anyway, ext2
217 is a good choice as cache partition for speed.
219 Use the script /usr/arla/sbin/startarla to start Arla. There's also
220 a SysV-based init script called arla.init you can install into
221 /etc/rc.d (or where your init files are located).
223 If you are using Linux 2.2 and libc4, libc5 or glibc 2.0,
224 (or programs that use these version of libc, such as Matlab)
225 you may want to enable the getcwd syscall, which works much better
226 than the old way of doing getcwd. In order to do this, follow
229 1. Copy /usr/arla/lib/libgetcwd.so.X (where X is the arla version)
231 2. Run "/sbin/ldconfig".
232 3. Run "LD_PRELOAD=/lib/libgetcwd.so.0 /bin/pwd". If this fails
233 with "/bin/pwd: can't load library '/lib/libgetcwd.so.0'" or
234 some other error message, report this error.
235 4. If the previous step went well, add this line to /etc/ld.so.preload:
238 DO NOT load the file from /usr/arla/lib, since /usr probably is not
239 part of the root partition of your system. If you do this, your system
240 will probably not be able to boot, even in single user, since in most
241 Linux installations, init, sh, mount and other programs are dynamically
244 If you use glibc 2.1 or later, the above method is unnecessary and
245 the line /lib/libgetcwd.so.0 should be removed from /etc/ld.so.preload
250 You can not load kernel modules (the modload step) when your
251 securelevel is above zero. There are two ways to make sure that you
252 can load kernel modules:
254 * You can compile a new kernel with "option INSECURE". This will make
255 the securelevel be zero in multiuser. Then you can load the modules
256 with the above commands. Some people might consider this a security
259 * You can load the modules in /etc/lkm.conf (for NetBSD) or
260 /etc/rc.securelevel (for OpenBSD).
264 Do like in {Net|Open} except that after the first time (when /dev/nnpfs0
265 exists) you can skip the modload since the module with automatically
266 be loaded by mount_nnpfs assuming you have copied nnpfs_mod.o to /modules with
267 something like the following commands:
270 cp /usr/arla/bin/nnpfs.ko /modules
272 And mount_nnpfs will load the filesystem into the kernel.
274 As with other BSDs, /usr/arla/bin/startarla should do everything for you.
278 Just use /usr/arla/sbin/startarla. If that does not work, see the
279 more detailed explanation here.
281 Add a line to /etc/name_to_major with (138 should be any unused number)
285 and another one to /etc/name_to_sysnum (105 is the preferred system
286 call number by Solaris < 7 and 73 for Solaris 7). If that's already
287 used by Transarc AFS on your machine pick some other number. You can
288 only pick system calls that are marked as loadable, namely these
289 system calls on Solaris 7:
290 40, 42, 45, 49, 51 - 53, 64-78, 82, 83, 101, 102, 110, 111, 127, 140,
291 150, 151, 176 - 184, 226 - 229
299 You might have to reboot for these changes to take effect. Then, type:
303 You should probably add a file in /usr/kernel/drv/nnpfs.conf with:
305 name="nnpfs" parent="pseudo" instance=0;
311 Create a /dev link and a directory:
313 ln -s "/devices/pseudo/nnpfs@0:" /dev/nnpfs0
316 Now you can try mounting the file system and start the daemon:
318 /usr/arla/bin/mount_nnpfs /dev/nnpfs0 /afs
319 /usr/arla/libexec/arlad
321 Note that if you are using a syscall other than 105, you have to
322 set AFS_SYSCALL=nnpfs before starting arlad and using the token
323 manipulating programs of heimdal.
325 If you want to, you can copy the nnpfs/solaris/nnpfs module to /kernel/fs
326 and nnpfs/solaris/bin/mount_nnpfs to /lib/fs/nnpfs/mount which enables you to
327 automatically load the nnpfs module when mounting the nnpfs file system.
331 Create the device node:
333 mknod /dev/nnpfs0 c 100 0
335 And add a line like the following to /etc/vfs:
339 Now you can try mounting the file system and start the daemon:
341 /usr/arla/bin/nnpfs_load /usr/arla/bin/nnpfs
342 /usr/arla/bin/mount_nnpfs /dev/nnpfs0 /afs
343 /usr/arla/libexec/arlad
345 Tru64 Unix (aka Digital Unix (aka OSF/1)):
347 Copy the nnpfs.mod to some of /subsys, /var/subsys, /sys/BINARY,
348 or /subsystems. Depending on what your kloadsrv thinks is the
351 Load (configure) the module with sysconfig -c nnpfs
353 Query the module to see if it loaded ok and get the
354 character device and syscall number from it with:
357 Create the char-device "mknod /dev/nnpfs0 c <MAJOR> 0"
358 where <MAJOR> is the number obtained above.
360 Create the afs directory: mkdir /afs
362 Mount the device and start the daemon:
363 /usr/arla/bin/mount_nnpfs /dev/nnpfs0 /afs
364 /usr/arla/libexec/arlad
366 It could look something like this:
368 datan:~# sysconfig -c nnpfs
369 datan:~# sysconfig -q nnpfs
373 datan:~# mknod /dev/nnpfs0 c 68 0
375 datan:~# /usr/arla/bin/mount_nnpfs /dev/nnpfs0 /afs
376 datan:~# /usr/arla/libexec/arlad
377 datan:~# ls /afs | head
385 If Arla does not work completely, if you do not have root permission
386 on your machine or want to test for some other reason, there is a
387 user-space command-line based program called arla-cli, that you can
388 use to to access AFS. When starting, it should print some messages
389 and then give you the prompt `arla>'. There are very minimal commands
390 for navigating the AFS space (ls, cd and cat). Type `help' to get a
391 list of all the commands.
393 Run `arla-cli --help' for a list of the options supported.
397 There are a number of tests in the `tests' directory. Use a command
398 similar to the following to run them:
400 env WORKDIR=workdir ./run-tests
402 where `workdir' is a temporary directory in AFS space where you have
403 read and write permission. run-tests takes lots of options, try
404 `-help'. You should probably start by running `-fast -all' and if you
405 have a lot of patience and time try `-all'. The `-fast -all' tests
406 test most of the common operations and is a good general test run.
407 The test that aren't marked `fast' do a rather unkind stress test of
408 things and takes a few hours to run.
412 If you have to use Arla though a firewall, it is useful to review how
413 Arla communicates. Arla uses UDP in the following way:
416 7001(*) <--> 7000,7003
419 whatever(***) <--> 7002,7003,7005
421 (*) arla older then 0.36 used 4711
425 (***) dynamically assigned port numbers, depends on your OS
427 If your server is on the other side of a firewall or NAT gateway and
428 the configuration allows connections to be opened only one way, your
429 client will probably miss file updates from other clients, even if
430 your file system looks good after startup. If you manage to configure
431 your NAT gateway so that the UDP timeout is longer than the
432 duration between arlad's keepalive packets to the server you
433 might be able to use AFS behind a NAT anyway.