Accessing Network Software over AFS on openSUSE

 

This guide will show you how to set up AFS on openSUSE. With AFS you can access several pieces of software, including Maple, Mathematica, and Matlab, over the network without having it installed locally. Unlike SSH, where the software is run on a remote computer leading to a lot of lag, with AFS the software is run on your local computer, but the software is stored on a remote server so there is little if any lag (except, in some cases, the first time the program is run).

Contents

 

Intallation

 

First, you will need to install the openafs-client and the openafs kernel module. These are both required in order to access AFS shares. Currently only 11.2 has packages that support the current kernel.

Official openAFS Client 1-click install

These packages may not be updated to work with later kernel versions, as has happened with earlier releases. If that is the case you can use the third-party packages below.

The following packages are third-party packages, they are neither created nor endorsed by openSUSE, Novell, or Boston University. Use them at you own risk.

For openSUSE 11.2: Unofficial openAFS Client 1-click install

For openSUSE 11.1: Unofficial openAFS Client 1-click install

For openSUSE 11.0: Unofficial openAFS Client 1-click install

 

Configuration

 

Once installation is finished, you will need to configure AFS to use the BU AFS servers. As root, open the following files with your favorite text editor:

/etc/openafs/CellAlias
/etc/openafs/CellServDB
/etc/openafs/ThisCell

Changes the contents of CellAlias to be:

bu.edu bu

Changes the contents of CellServDB to be:

>bu.edu                    # Boston University
128.197.27.84                   #kerberos2.bu.edu
128.197.27.92                   #kerberos1.bu.edu
128.197.26.101                  #kerberos3.bu.edu

If you get an error about UTF encoding and/or can’t change the text, make sure your text editor is not in read-only mode.

Change the contents of ThisCell to be:

bu.edu

Remember, you want to change the contents of the files, that means deleting anything that is already there. Make sure each file ends with a newline then save and close all of the files.

 

Enable the Service

 

Next, you will need to turn on openAFS. Open YaST. In the “System” section, open the “System Services (Runlevel)” module. Scroll down to “openafs-client”. If it says “Yes” in the Enabled column, click OK. If it says “No” or “Yes*”, click the openafs-client row and click the “enable” button at the bottom. If you get an error message, make sure the configuration files in the previous section are correct. If it says “No*”, go to the expert tab, click the openafs-client row, and check the boxes at the bottom labeled “3” and “5”. Then click OK.

You should now have an “afs” directory in your root directory. You can check this by opening a file manager and navigating to the root (“/”) directory, or by typing “ls /” in a terminal.

 

Optional: Make software available from the terminal

 

Optionally, you can set the system up to allows you to automatically access AFS software from the terminal without having to type out the full path. For instance to launch matlab you merely have to type “matlab”. To do this, you need to add the necessary directories to your path. The path is the list of directories linux searches when you type something into the command line.

There are two ways to make folders available in your path. One is to add it to the global path, which means all users on the system will automatically have access to the software. The other way is to add it to your personal path, which means only you will have access. If you do it the latter way, all users who want automatic access to the software will need to add them to their own path. You can also add some of the directories to your personal path and some to the global path, depending on your needs. I personally recommend adding them all to the global path.

The only difference between the two approaches is which file you edit. To add it to the global path, you will need to edit the file “/etc/profile.local” as root using your favorite text editor. You may need to make the file since it does not exist on a clean openSUSE installation. To add it to your personal path, you will need to edit the “.bashrc” file in your home (“~”) directory. This is a hidden file so you will probably not see it normally, but it is always present in openSUSE unless you made some substantial changes to the system.

The lines you will want to add depend on the software you wish to have available. You can add combination of software you want. It is probably better to add the lines to the end of the file you are editing.

For Maple, add this line:

export PATH=$PATH:/afs/bu.edu/common/IT/maple/bin

For Mathematica, add this line:

export PATH=$PATH:/afs/bu.edu/common/IT/mathematica/bin

For Matlab, add this line:

export PATH=$PATH:/afs/bu.edu/common/IT/matlab/bin

The advantage of these directories over the other possible directories on the AFS server is that these directories always point to the most up-to-date version of each program. If you wish to use a specific version, you can use one of the other directories in the /afs/bu.edu/common/IT directory while following the same general pattern. With these lines, the operating system will always defer to local versions of the software even when connected to AFS and even if the AFS version is newer. If you wish to use the afs version even when you have a local version installed, you will need to remove the “$PATH:” from the beginning of each line and add “:$PATH” to the end. I advise against this unless you absolutely need it.

If you put directories in your global path, you will need to restart the computer. Otherwise simply logout and log back in again. You should then be able to run the programs directly from the terminal.