Details
The OpenAFS client can be installed on any Linux distribution but the details of how to do so vary. You will need root permission and usually some familiarity with a command line. The process is complicated by the necessity for a kernel module that must match the kernel you are running.
Some distros (Ubuntu and Debian) make installation relatively straightforward by including OpenAFS in their repository. Other distros (Red Hat/CentOS, Fedora, SUSE) have RPMs on the OpenAFS website. This also works well except there is sometimes a lengthy delay between when a distro releases a new kernel and when the OpenAFS project releases a matching kernel module RPM. To avoid this issue, we recommend using DKMS which is a system to automatically compile new kernel modules as necessary. Note: DKMS requires that you have gcc (a C compiler) and various other development tools installed.
We've done our best to create useful instructions here but there are a lot of variables so if you need help installing the OpenAFS client on your Linux machine, contact us Research.Computing@dartmouth.edu.
Prerequisites
You will need to know your Linux distribution (Red Hat, Ubuntu, etc.), the architecture for that distro (x86_64, i686, i386), and our cell name which is northstar.dartmouth.edu
- Determining Linux distribution: In a terminal window type cat /etc/*-release You may get multiple lines of output. Look for something like:
-
- Red Hat Enterprise Linux Workstation release 6.5 (Santiago) - this is Redhat Enterprise version 6
- Fedora Release 20 (Heisenbug) - this is is Fedora 20
- Determining architecture: Type uname -m in a terminal window. It should be one of these three values:
- As previously mentioned, you will need gcc if you want DKMS to create kernel modules automatically. Type gcc --version in a terminal window. If you have gcc, the output will include a line similar to
- gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Installing the OpenAFS Client on Red Hat Enterprise Linux using DKMS
- Install the dkms rpm from the EPEL repository. See using the EPEL repository.
- Download the appropriate RPMs for your system from the OpenAFS website. There are four that you need: openafs, openafs-client, openafs-krb5, and dkms-openafs. Be sure to get the right architecture (i.e. x86_64 or i686) and release (e.g. RHEL6=el6). Below are links to the versions (x86_64 only) we are using internally. These should be a safe bet but may not always be the latest.
- Become root: su - root
- If you did not have gcc, here is the command to install it (plus a few other prerequisites). yum install flex kernel-headers kernel-devel glibc-headers glibc-devel gcc
- Install the five RPMs which you downloaded in steps 1 and 2. As long as you do not have other like-named RPMs in your download directory, you can do: yum install openafs*.rpm dkms*.rpm
- Set the default cell with: echo northstar.dartmouth.edu > /usr/vice/etc/ThisCell
- Start the client: service openafs-client start
- The client should now be running. Note, in the future it will start automatically at boot time. Some quick tests to verify functionality are:
-
- df -h -> should see a line that starts with AFS and ends with /afs.
- kinit netid@KIEWIT.DARTMOUTH.EDU -> use your Dartmouth NetID and you should be prompted for your NetID password
- aklog -> If your NetID has been enabled for AFS access, you will see no output from this command, but the next command will show an AFS token
- tokens -> should see an AFS token listed for the numeric UID that is associated with your NetID.
Installing on Fedora using DKMS
- Download the appropriate RPMs for your system from the OpenAFS website. There are four that you need: openafs, openafs-client, openafs-kpasswd, and dkms-openafs. Be sure to get the right architecture (x86_64 or i686) and release (e.g. Fedora 20 = fc20).
- Become root: su - root
- If you did not have gcc, here is the command to install it (plus a few other prerequisites). yum install flex kernel-headers kernel-devel glibc-headers glibc-devel gcc
- Install the dkms RPM from the Fedora repo: yum install dkms Do not combine this with the next step.
- Install the four RPMs which you downloaded in step 1. As long as you do not have other like-named RPMs in your download directory, you can do: yum install openafs*.rpm dkms*.rpm"
- Set the default cell with: echo northstar.dartmouth.edu > /usr/vice/etc/ThisCell
- Set the client to start at boot time: systemctl enable openafs-client.service
- Start the client manually for right now: systemctl start openafs-client.service
- The client should now be running. Some quick tests to verify functionality are:
-
- df -h -> should see a line that starts with AFS and ends with /afs.
- klog username -> use your AFS username and you should be prompted for your AFS password
- tokens -> should see an AFS token listed
Uninstalling the OpenAFS Client
RHEL/CentOS/Fedora: As root, yum erase openafs openafs-client openafs-kpasswd dkms-openafs